Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I am trying to compare a measure value with null("") through OR condition
Ex:Measure = if(precreatedMeasure1 = "" || precreatedmeasure2 =0, "",sum(columndata)).
There is no error in syntax
But doesn't support for visuals
It says "DAX COMPARISON OPERATORS DO NOT SUPPORT COMPARING VALUES OF TYPE TEXT"
(NULL is considered as text here )
can I please find any solution to compare with null values.
Solved! Go to Solution.
DAX uses BLANK() for database nulls.
You can try above code it will resolve your issue and you can also refer below article.
https://docs.microsoft.com/en-us/dax/blank-function-dax
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Can you try below code
Measures =
IF (
OR ( precreatedMeasure1 = BLANK (), precreatedmeasure2 = 0 ),
BLANK (),
SUM ( columndata )
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Samarth_18 ,
I was going through
@https://youtu.be/C26DQkb4hy where in got to know Blank( ) and Null aren't same!
So do we have any possibilities to compare a value with null.
If we have such It would be really helpful.
DAX uses BLANK() for database nulls.
You can try above code it will resolve your issue and you can also refer below article.
https://docs.microsoft.com/en-us/dax/blank-function-dax
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Samarth_18 ,
Thanks for your reply, I could understand now that Blank( ) and null aren't same but DAX treats them as same.
And yes, DAX COMPARISON OPERATORS works fine when comparing with Blank( ).
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
71 | |
42 | |
21 | |
20 | |
13 |
User | Count |
---|---|
125 | |
41 | |
32 | |
27 | |
24 |