Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

DAX Measure - Count, any null is 0 instead of (Blank)

I have a measure that counts the total number of customers, which then is used to Drill-Through to a table.

I put it onto a card visual. Some come back as (Blank), and I want this to be replaced with 0.


Here's my DAX, please help, it's not working:

Customer Name M = VAR _CustomerName = COUNT('All Customer Profiles'[Customer Name])
IF(_CustomerName= "(blank)" ,"0",_CustomerName)
Helper I
Helper I

Hi @sarah8991

so you are using the raw source data, is it correct?




So its easy to you just make new column with this code




Column = IF(ISBLANK(**original column**),0,**original column**)


**original column** - your name for the column you are using.


Then change the value to the new column and it should work 🙂

thank you!

Can you please mark this as complete. If you satisfied with the answer. 

Thanks and Regards 


Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors