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
Romeshpsl
Advocate I
Advocate I

Surpress Zero values in Charts

 

How do I get the x axis lables disapprear from the chart when values are zero. I can't really filter out when loading data, as these lables are from a calculated column.

 

 Capture.PNG

12 REPLIES 12
Anonymous
Not applicable

Hi everyone,

I have the same issue with the matrix chart. I created a measure to calculate, so on the chart showing zero value. I want to suppress zero value (red color box below)

Thank you!

2021-01-20_14h10_29.png

 

 

Anonymous
Not applicable

I had the same problem and just replaced the 0 values with null in the power query. It works for me!

This was the perfect solution! Thank you!

Justair07
Resolver I
Resolver I

@Romeshpsl you can change the position of the data label to Inside End. Simple but effective.

GREAT SOLUTION

ankitpatira
Community Champion
Community Champion

@Romeshpsl for fields dropped onto visual you also have option to specify show items with no data which will take away blanks.

 

2016-04-29_13-46-10.png

Thanks guys. I tried the "show item with no data" but didn't work. I think it is because there are data but the amount is zero. So did bit of search and found another solution (similar to creating a measure, but without creating one) by applying a filter to show valvue greater than 0. See below. Capture.PNG

We can apply filters to the values if they are not measures or calculated fields.

 

However , in the same example had there been "Average fte" instead of just "fte" this method wont work or will give incorrect results.

 

One can always write DAX if-else queries to get results as desired but  I am looking for a less complex solution.

 

 

This solution works if the field is taken as is.

 

However if the filter or the data values is a measure/calculated field , this method does not work.

 

Lets say instead of "fte", had it been Avegrage fte then it will take that calculated measure and if you try to filter it with "greater then 0" it will give incorrect results.

 

The intent is to get the supressed values as input at first place and then doing average of that.

 

Is there a solution for that?

One can always write if-else DAX query but I am looking for a less complex solution.

I am plotting a clustered column charts for various surgeries performed by a group of doctors for a particular day.

surgeries.png

 

Its not mandatory that all the doctors will perform all types of surgeries in a day. 

 

If I apply filters to suppress Zero values on all types of surgeries, the chart goes blank.

 

How do i achieve it?

Anonymous
Not applicable

Create a new measure something like below , add it to your chart 

Measure = CALCULATE(SUM(Table1[Value]),Table1[Value]>0)

This worked perfect, thank you!! I'd like to add a word of caution though, I had to change the > to <> otherwise it bypassed negative values on a few months where we had negative sales due to Returns.

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.