Forum Discussion
Add a null condition in DAX
- 8 years ago
Null is BLANK() in DAX
https://msdn.microsoft.com/en-us/query-bi/dax/blank-function-dax
try this syntaxTAX_TRANSACTION[TAX_SUB_TRANS.REVERSE_FLAG] = BLANK()
- 8 years ago
Hi zlokesh
I think you're incorrect - ISBLANK is checking whther a given expression is BLANK or not, returning TRUE/FALSEhttps://msdn.microsoft.com/en-us/query-bi/dax/isblank-function-dax
BLANK() will return a blank/null value
https://msdn.microsoft.com/en-us/query-bi/dax/blank-function-dax
Dear Narender,
ISBLANK is the function for NULL. use ISBLANK to check NULL.
Your expression will be like below, Please check in editor for accuracy.
Measure =
CALCULATE(ISBLANK(sum(TAX_TRANSACTION[TAX_SUB_TRANS.AMOUNT]),
FILTER(TAX_TRANSACTION,TAX_TRANSACTION[TAX_SUB_TRANS.REVERSE_FLAG]="N" )&& (TAX_TRANSACTION[TAX_SUB_TRANS.CHARGE_TYPE_NO]=2 ||TAX_TRANSACTION[TAX_SUB_TRANS.CHARGE_TYPE_NO]=13 ||TAX_TRANSACTION[TAX_SUB_TRANS.CHARGE_TYPE_NO]=15)))
Thanks
Hi zlokesh
I think you're incorrect - ISBLANK is checking whther a given expression is BLANK or not, returning TRUE/FALSE
https://msdn.microsoft.com/en-us/query-bi/dax/isblank-function-dax
BLANK() will return a blank/null value
https://msdn.microsoft.com/en-us/query-bi/dax/blank-function-dax
- Narender8 years agoResolver I
Hi Stachu,
Blank() is working in Dax.
Like
Reverse_Flag= N || Reverse_Flag=Blank().
- Anonymous6 years agoNot applicable
It's not quite correct though because if they use the blank in a calculation it will count as 0 not NULL. Which will introduce errors.
As in this article https://www.sqlbi.com/articles/how-to-handle-blank-in-dax-measures/