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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Chandra_maha
Helper I
Helper I

How to convert Blank from Column to Zero (0)

Hi,

 

I have a column, that column contain the list of users. I am filttering that data according to "Country". However, when I am applying the "Year" filter, some of the country show "Blank". As showin in below image. 

Chandra_maha_0-1665048585728.png

I want to convert that "Blank" into "0". I tried multiple way but it did not work. 
Capacity_needed_with_Zero = IF(ISBLANK(Meausre Name),0, meausre Name)   - this one only work with Measure. But, I am getting data from the coulmn. Please let me know, how can I get the "0", or how can I convert column in measure so that I can use above formula.

1 ACCEPTED SOLUTION

I got the workaround for this. 
I am using Count to make another meausre and then applyig 
Capacity_needed_with_Zero = IF(ISBLANK(Meausre Name),0, meausre Name) 
DAX expression to Count Measure.  Its working fine

Thanks

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @Chandra_maha,

In fact, you only need to add '+0' after your expression, then power bi will force expand the calculation ranges and auto replace the blank result to 'zero'.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Did not get the solution could you plese elabrote it.
As informed earlier, Capacity_needed_with_Zero = IF(ISBLANK(Meausre Name),0, meausre Name)   - this formula only take measures. I have column, because of that I am unable to get desired result.

Hi @Chandra_maha,

Yes, these expression only work on measure. If you table not include the correspond records that match with selection, this blank is used to notice all the record has been filtered.(current power bi not support create dynamic change calculated column/table to interact with filter)

Reference link:

Solved: Replacing (Blanks) with 0 - Microsoft Power BI Community

Notice: the data level of power bi(from parent to child level)

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I got the workaround for this. 
I am using Count to make another meausre and then applyig 
Capacity_needed_with_Zero = IF(ISBLANK(Meausre Name),0, meausre Name) 
DAX expression to Count Measure.  Its working fine

Thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.