| description | Error (MDX) |
|---|---|
| title | Error (MDX) | Microsoft Docs |
| ms.date | 02/17/2022 |
| ms.prod | sql |
| ms.technology | analysis-services |
| ms.custom | mdx |
| ms.topic | reference |
| ms.author | owend |
| ms.reviewer | owend |
| author | minewiskan |
Raises an error, optionally providing a specified error message.
Error( [ Error_Text ] )
Error_Text
A valid string expression containing the error message to be returned.
The following query shows how to use the Error function inside a calculated measure:
WITH MEMBER MEASURES.ERRORDEMO AS ERROR("THIS IS AN ERROR")
SELECT
MEASURES.ERRORDEMO ON 0
FROM [Adventure Works]