Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello
**I'm reposting this with the addition of a .pbix and .csv file as the original post (DAX command to differentiate between null value an... - Microsoft Fabric Community) has gone dead**
I've read a few posts along these lines and tried a few of the solutions but none appear to be working. The situation is that I have a calculated column that returns a simple percentage that is a calculation of a filtered value:
return if( not ISBLANK([defined variable]), [defined variable], (if( [defined variable] = 0, 0, BLANK()) ))
Here is a link to the .pbix file and .csv data (I'm unable to directly attach these files unfortunately) - https://www.dropbox.com/scl/fo/zyhko4e7zr0ucxtdv453i/h?rlkey=z2f4bum5ybcb48eje5pdi4vyu&dl=0
Any tips from the brains trust? None of the solutions thus far have worked and ChatGPT has been unable to solve it either!
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please try something like below whether it suits your requirement.
%COG_IMP =
VAR _a =
CALCULATE (
COUNTA ( 'Interviews_All-Data'[Mind Active] ),
'Interviews_All-Data'[Mind Active] IN { "Yes" }
)
VAR _b =
COUNTA ( 'Interviews_All-Data'[Mind Active] )
RETURN
IF ( _a = 0 && _b <> 0, 0, DIVIDE ( _a, _b, BLANK () ) )
Hi,
I am not sure if I understood your question correctly, but please try something like below whether it suits your requirement.
%COG_IMP =
VAR _a =
CALCULATE (
COUNTA ( 'Interviews_All-Data'[Mind Active] ),
'Interviews_All-Data'[Mind Active] IN { "Yes" }
)
VAR _b =
COUNTA ( 'Interviews_All-Data'[Mind Active] )
RETURN
IF ( _a = 0 && _b <> 0, 0, DIVIDE ( _a, _b, BLANK () ) )
Yes, this worked! Thank you, I knew there had to be simple solution but just couldn't get there. Thanks so much for your help.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 19 | |
| 13 | |
| 10 |