Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
claireberry
Helper I
Helper I

Data suppression for a stacked column chart

Is it possible to have suppression be reflected in a stacked column chart?
So if some count is not 0 and fewer than 10, have the chart label in a stacked column chart display the character "S"?

example:

pick stacked column chart

x-axis ---- Jurisdiction

y-axis ---- Counts (if this count is not 0 and fewer than 10 then the chart would display "S")

Thank you. 

1 ACCEPTED SOLUTION

@claireberry 

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

14 REPLIES 14
ryan_mayu
Super User
Super User

@claireberry 

we can't do this in a normal way.

 

this is the sample data i used

 

 

stategender

A M
A M
A F
A F
B M
B M
B M
B M
B M
B M
B F
B F
B F
B F
B F
B F
B

M

 

I did the data transform in PQ and use DAX to create a new column

 

and do some settings on the chart

 

11.PNG

pls see the attachment below.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for another solution. Is this the only way to achieve the bar chart with the gender legend? My data is too big to do that;I also don't understand the logic behind it. Would sample data like this below also need a transformation first like you did? Thank you

claireberry_0-1735861507381.png

 

pls paste the data in the reply(not the screenshot)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




statecountgender
A1F
A1M
A1F
A1M
A1F
B1M
B1F
B1M
B1F
B1M
B1F
B1M
B1F
B1M
B1F
B1M
B1F
B1M
C1F
C1M
C1F
C1M
C1F
C1M
C1F
C1M
C1F
C1M
C1F
C1M
C1F
C1M
C1F
C1M
C1F
C1M
C1F

@claireberry 

 

you just need to paste and update the data in the PQ, then after refresh ,you will get the new visual





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




claireberry
Helper I
Helper I

claireberry_0-1735522252569.png

This picture is generated using the sample data you used. I just covered the bar with a card so you can see what I ultimately want to achieve. The point is not letting the viewer see that "a" has 5 counts anywhere in the chart. Thank you. 

@claireberry 

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




claireberry_0-1735572640409.png

Sorry, it didn't completely work for me. I get the above error message when I put measure2 in the Detail -> Data slot. So It couldn't show the "S"

Yes, this is exactly what I want. Can you let me know what the settings are to achieve that? Mainly, how do you get the "S" to appear? Thank you

@claireberry 

I created two measures

 

Measure =
VAR _sum=sum('Table'[Column2])
return if(_sum>=0 && _sum<10,0,_sum)
 
this measure to display 0 if the value is between 0 to 10
 
measure2 =
IF(
    [Measure]=0,
    "S",
    FORMAT([Measure],"#.##")
)
 
this measure will be added to detailed to display S instead of 0
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi ryan_mayu

Thank so much for the V3. Can you please elaborate on why in the solution V3 isn't showing the blanks in the gender legend? I tried to implement the solution in my set of data, it shows blanks in the gender in the bar graph. thank you

ryan_mayu
Super User
Super User

@claireberry 

 

pls see the attchment below. you can try to change sum to count

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for the pbix. Is it possible to let the bar on the right not show the count( no bar at all), just "S"?

could you pls provde some sample data and expected output? you can draw the chart in excel for a reference.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.