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
phchu1226
Helper IV
Helper IV

Hide the columns with zero value in clustered column chart

Hello,

Is it possible to hide those columns with zero values?

I tried to use filters and it doesn't work well..

Anyone can help?
Thank you!!

phchu1226_1-1623986968881.png

 

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @phchu1226 ,

 

unfortunately, this is not possible, at least not 100%. Here you will see my sample data:

image.png

Segment B (a column inside a cluster) carries a value in the group this, but is 0 in the group that, whereas the value of segment C is 0 in both groups.

This is how the clustered column chart will look like:

image.png

 If I now create a measure like so:

check = 
IF(
    CALCULATE( SUM( 'Table'[Amount] ) ) = 0
    ,  BLANK()
    , 1
)

and use this measure as  a visual level filter on the clustered column chart:

image.png

There still is an empty place in the group that, that represents segment B

image.png 

But at least the column label 0 will not be shown any longer.

 

Hopefully, this provides an idea of how to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

9 REPLIES 9
TomMartens
Super User
Super User

Hey @phchu1226 ,

 

unfortunately, this is not possible, at least not 100%. Here you will see my sample data:

image.png

Segment B (a column inside a cluster) carries a value in the group this, but is 0 in the group that, whereas the value of segment C is 0 in both groups.

This is how the clustered column chart will look like:

image.png

 If I now create a measure like so:

check = 
IF(
    CALCULATE( SUM( 'Table'[Amount] ) ) = 0
    ,  BLANK()
    , 1
)

and use this measure as  a visual level filter on the clustered column chart:

image.png

There still is an empty place in the group that, that represents segment B

image.png 

But at least the column label 0 will not be shown any longer.

 

Hopefully, this provides an idea of how to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

@TomMartens 

You got my point, I can hide the zero label now but the chart still exists those empty column and I cannot align other columns which contain value to the centre.

So it means that there is no such kind of feature to achieve this in PowerBI? It must show a zero/blank column there even though the column have no value?

Unfortunately, all segments that survive the visual level filter are used across all groups - in my example this & that. To some extent, this is good for the readability of the data visualization but of course, consumes more space.



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
phchu1226
Helper IV
Helper IV

@amitchandak 

 

I tried to apply the visual level filter, like "stock is not 0", then all the columns disappear.

How can I do the filter on only one specific column? I just wanna dont show those columns with 0.

@phchu1226 , these two ways should work.

Can you a sample pbix after removing sensitive data.

@amitchandak 

If I use this way: visual level filter , [Measure] <> 0

Which filter should I set in order to hide the columns 'C' & 'D' but 'A' & 'B' remain unchanged??

 

phchu1226_0-1623991218821.png

 

@phchu1226 , Then better to create measure as i suggested

 

C new = if([C] =0, blank, [C])

 

D new = if([D] =0, blank, [D])

@amitchandak,

 

I can hide the zero label now.. thank you.

amitchandak
Super User
Super User

@phchu1226 , Create a measure like

 

if([Meausre] =0, blank, [measure])

 

Of use visual level filter , [Measure] <> 0

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.