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
Hi,
I'm having issues with my DAX formula in showing a true 0% when the division formula calculates it. Using a Card (New) so as to be able to show if no data is present and therefore blank, then "No data" is displayed however, when my divide formula below calculates 0%, it shows as "No data" also. However in this instance, I want to be able to show as a 0% result as it demonstrates a 0% score rather than just no data being available.
Is there a way I can do this?
DAX formula below:
Score =
DIVIDE(
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID"
),
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID" || Data[Score] = "NC")
)
Thanks
Solved! Go to Solution.
@Mike35 it basically depends on how you want to handle blanks for numerator and denominator:
I added two sample measures: what happens if the numerator or denominator is blank, when it returns 0, and when it returns blank. Also, I updated your measure to showcase what you can do to overcome this. You can tweak it further based on your needs since now you know why you are getting blank.
Num Blank = DIVIDE ( BLANK (), 1, 0 )
Den Blank = DIVIDE ( 1, BLANK (), 0 )
Score % =
DIVIDE(
COALESCE (
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID"
),
0
),
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID" || Data[Score] = "NC")
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Mike35 it basically depends on how you want to handle blanks for numerator and denominator:
I added two sample measures: what happens if the numerator or denominator is blank, when it returns 0, and when it returns blank. Also, I updated your measure to showcase what you can do to overcome this. You can tweak it further based on your needs since now you know why you are getting blank.
Num Blank = DIVIDE ( BLANK (), 1, 0 )
Den Blank = DIVIDE ( 1, BLANK (), 0 )
Score % =
DIVIDE(
COALESCE (
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID"
),
0
),
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID" || Data[Score] = "NC")
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Mike35 Thanks for sharing the sample data. Do you have flat single table that you are working on or do you have other tables in your model? It is important to know the semantic model before I provide a solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
so what does this show?
Score =
DIVIDE(
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID"
),
CALCULATE(
COUNTROWS(Data),
Data[Score] = "FC" || Data[Score] = "CID" || Data[Score] = "NC"),
0
)
Still shows as "No data" as if it is a blank
@Mike35 can you share the sample data and explain the issue? It will help to provide the appropriate solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
By way of an example, the formula is treating FC & CID results as good results, NC as bad results. Using the formula in my first post, from the below data I'd expect:
January: 50.00%
February: 0.00%
March: 100%
April: No data
| 1st January | CID |
| 1st January | NC |
| 1st February | NC |
| 1st March | FC |
| 1st March | FC |
| 1st March | CID |
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!