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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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