Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I authored a query with two IF statements where I used two boolean expressions respectively as condition and result, to my surprised, the value2 returned a "Flase" when I think it should be BLANK(). When I put the BLANK() in the 3rd parameter as value1, the it gets a right result "True".
the code is here: https://dax.do/d1lbobLn8I35w4/
can anyone explain what's happening inside DAX? thanks a lot
Solved! Go to Solution.
Hi @sangjinhong
The short answer is that BLANK() is not an allowed value for any expression that is cast as Boolean type, and will automatically be converted to false.
With your two sample expressions, they are both cast as Boolean since one of the branches of IF returns a Boolean.
You can also demonstrate the behaviour with this query:
EVALUATE
{ CONVERT ( BLANK (), BOOLEAN ) }
Check out this article, specifically the section "Handling BLANK in Boolean expressions".
Regards,
Owen
Hi @sangjinhong
The short answer is that BLANK() is not an allowed value for any expression that is cast as Boolean type, and will automatically be converted to false.
With your two sample expressions, they are both cast as Boolean since one of the branches of IF returns a Boolean.
You can also demonstrate the behaviour with this query:
EVALUATE
{ CONVERT ( BLANK (), BOOLEAN ) }
Check out this article, specifically the section "Handling BLANK in Boolean expressions".
Regards,
Owen
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |