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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

100% stacked bar graph and visual level filters

Hi there,

Here is a sample of my dataset, and its respective graph:

datasettest.PNGgraph.PNG

I have a various slicers for different demographics for users to slice the data by. In order to maintain privacy and confidentiality, if the sample size gets sliced down to less than 20 at any of the time points, I don't want the data at that time point to appear. (Note: different time points have different sample sizes)

I have tried using several visual level filters in combination with measures on the stacked 100% bar graph, however instead of filtering out the entire bar/time point, it filters by each individual segment in the graph, which skews the percentages and is not what I want.

Does anyone know how to filter a stacked 100% bar graph to remove the entire bar, rather than the segments within it? Or any work arounds using measures or columns? 

Thanks

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous the measure you are using, should return blank() value when your data points are less than 20. You need to enhance your measure used in chart.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I am not using a measure in my chart, I am using a column. I tried to create a duplicate column with this code to do make the value blank if the column is less than 20, but it doesn't seem to be working: if(count('Year 4 data'[variable1]) > 20, 'Year 4 data'[variable1], BLANK())

 
I also created this measure: if(COUNT('Year 4 data'[variable1]) > 20, 1, 0)
and set it as a visual level filter to "show items when the value is 1" but then it only removes certain segments of the bar not the entire bar as I mentioned.
Any ideas?

@Anonymous please share sample data or pbix file to work on it.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors