| title | Error (MDX) | Microsoft Docs | |
|---|---|---|
| ms.custom | ||
| ms.date | 03/02/2016 | |
| ms.prod | sql-server-2016 | |
| ms.reviewer | ||
| ms.suite | ||
| ms.technology |
|
|
| ms.tgt_pltfrm | ||
| ms.topic | language-reference | |
| f1_keywords |
|
|
| dev_langs |
|
|
| helpviewer_keywords |
|
|
| ms.assetid | 2caac19b-b297-443e-9299-648ef88a5039 | |
| caps.latest.revision | 32 | |
| author | Minewiskan | |
| ms.author | owend | |
| manager | erikre |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]
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]