Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RobertoArreola8
Regular Visitor

DAX Count to Show 0 instead ob Blanks by Status

hello everyone.

I am asking for your help, since this topic is driving me crazy. I've been trying to do a DAX based on a basic count, which is pretty simple. What I'm looking to do is to have the result of that DAX shows the blank fields as "0", but I haven't been able to find a good solution.

The formula I am using is the following:

StatusCountByCustomer =
SUMX(
VALUES('Retail Calendar'[Partner Name]),
CALCULATE(
DISTINCTCOUNT('Retail Calendar'[Status])
)
)

 

The options I have used to display the "0" are the following:

StatusCountByCustomer3 =
VAR StatusCountByCustomer = SUMX(
VALUES('Retail Calendar'[Partner Name]),
CALCULATE(
DISTINCTCOUNTNOBLANK('Retail Calendar'[Status])
))
RETURN
IF(
StatusCountByCustomer = BLANK(),
0,
StatusCountByCustomer
)

 

This is an example on where I want to show the blank results as "0"

RobertoArreola8_1-1694198511534.png

 

Thank you guys in advance! Hoping you can help me.

1 REPLY 1
some_bih
Super User
Super User

Hi @RobertoArreola8 

Not recommended for "big" number of rows, but you can always "add zero", like

Your measure + 0

Hope this help / kudos appreciate





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.