Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.17 KB

File metadata and controls

54 lines (41 loc) · 1.17 KB
title Error (MDX) | Microsoft Docs
ms.custom
ms.date 03/02/2016
ms.prod sql-server-2016
ms.reviewer
ms.suite
ms.technology
analysis-services
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
ERROR
dev_langs
kbMDX
helpviewer_keywords
Error function
ms.assetid 2caac19b-b297-443e-9299-648ef88a5039
caps.latest.revision 32
author Minewiskan
ms.author owend
manager erikre

Error (MDX)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]

Raises an error, optionally providing a specified error message.

Syntax

  
Error( [ Error_Text ] )  

Arguments

Error_Text
A valid string expression containing the error message to be returned.

Examples

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]

See Also

MDX Function Reference (MDX)