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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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