Forum Discussion
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!!
Hey phchu1226 ,
unfortunately, this is not possible, at least not 100%. Here you will see my sample data:
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:
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:
There still is an empty place in the group that, that represents segment B
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
9 Replies
- TomMartens
Super User
Hey phchu1226 ,
unfortunately, this is not possible, at least not 100%. Here you will see my sample data:
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:
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:
There still is an empty place in the group that, that represents segment B
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
- phchu1226
Helper IV
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?
- TomMartens
Super User
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.
- amitchandak
Super User
phchu1226 , Create a measure like
if([Meausre] =0, blank, [measure])
Of use visual level filter , [Measure] <> 0
- phchu1226
Helper IV
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.
- amitchandak
Super User
phchu1226 , these two ways should work.
Can you a sample pbix after removing sensitive data.
- phchu1226
Helper IV
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??