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
Anonymous
Not applicable

Replace 0 with Blank()

Hello all, (simple request)

 

While everyone has the issue of 'How to replace Blank() with 0' I'm actually trying to do the opposite.

Instead, I would like to 'Replace 0 with Blank()' aka a Blank space value result. (_____)

 

Below I just want 0 to be a Blank space value

NoNameJake_0-1630711387491.png

What DAX direction would you recommend for this?

Thanks for any feedback and for pointing me in the right direction!

4 REPLIES 4
henkvankester
Helper I
Helper I

Maybe use a measure instead of a column: 

 

Name measure = IF(SELECTEDVALUE([min THC%] = 0, BLANK(), SELECTEDVALUE([min THC%])).

 

If min THC% should be summed, then use SUM instead of 'SELECTEDVALUE'. 

 

There is also an option to transform your data, but then you're not using DAX. Change column to text and replace 0 with "" and change back.. 

Tiagojk
New Member

I recomand you use conditional formatting.

0(Zero) would be colored in write.

 

1) Values > Conditional Formatting > Background Color

2) Format Style : Rules

    Rules - If value : = 0  

    then = white color

Tiagojk_1-1669815904058.png

texmexdragon2
Helper V
Helper V

@Greg_Deckler  @Anonymous    I found this post as I am looking for the same thing.    However, I'm not sure the answer above is exactly what the original poster was looking for.   I think he wanted (as do I), an actual empty cell, with no 0 and not a cell that has the word "Blank" in it.   Just an empty cell.    Adding the BLANK() seems to add that word to the cell, rather than just returning an empty cell.   (and I am looking for a measure, not a column).  Any suggestions?

Greg_Deckler
Super User
Super User

@Anonymous Maybe Column = IF([Min THC%] = 0,BLANK(),[Min THC%])


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors