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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello I am doing a simple % calculation and would like to replace blanks with zero when blank is returned.
The calculation is
=[2020 total positive] / [total 2020] * 100
The [2020 total positive] value is based on this measure:
=CALCULATE(count(2020[resp]), (2020[resp] = 10))
Any help appreciated.
Many thanks,
A
Solved! Go to Solution.
@adavid999 , try like
divide([2020 total positive] , [total 2020],0)
You do not need *100, you can mark it as % column in format session.
You can add +0, but that will create a left join. All data will be displayed
@adavid999 , try like
divide([2020 total positive] , [total 2020],0)
You do not need *100, you can mark it as % column in format session.
You can add +0, but that will create a left join. All data will be displayed
Hi @adavid999 ,
You can try modifying your calculation in 2 ways:
Thanks,
Pragati
Hi @adavid999 ,
Create these measures
Measure = DIVIDE ([2020 total positive] /( [total 2020] * 100))
thanks @harshnathani the coalesce function looks like it would work but i don't appear to have it in excel power pivot
Hi @adavid999 ,
Create a custom Column in Power Query
= if [2020 total positive] = null then 0 else [2020 total positive] / ([total 2020] * 100)
or
= if [2020 total positive] = blank then 0 else [2020 total positive] / ([total 2020] * 100)
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
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!