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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.