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
RT3308
Helper I
Helper I

Measure handling BLANK() Awesome on Cards but not on graphs

I have a measure that when I used in cards, instead of showing (BLANKS)... I was able to display zero by doing "IF(ISBLANK(),0,..." - great.  But when I use the same measure in graphs, this now shows ZEROs and the x-axis is ugly to look at.  I don't want to create two measures - one preventing (blanks) and another with (blanks) just so it doesn't show in graphs.  Is there an elegant way of doing this?  Like a graph property or something?  Thanks in advance!

2 REPLIES 2
PhilipTreacy
Super User
Super User

Don't @RT3308

Try using a custom format string to not display 0 values

Click the measure, and in the Format area of the ribbon type this

0;0; ;

Notice the space before the last one;

frmstr.png

This is just an example format as I don't know if you're using decimal or integer numbers or some other format is needed for positive and negative numbers

You can read more about Custom Format Strings here

https://www.myonlinetraininghub.com/custom-formatting-strings-in-power-bi

Best regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


amitchandak
Super User
Super User

@RT3308 , I doubt as of now, there is no better way than add +0. This will show Show all values.

 

For date, I typically do this kind of solution

 

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

 

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.