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
flare_11
New Member

Hide responses in visual (100% stacked column chart) where respondents are less than 5

I am new to Power BI and am learning every single day. I have a data source that is currently in the form of a 100% stacked bar chart (survey). The responses are in the form of strongly agree, agree, neutral, disagree and strongly disagree.

 

When I use the following measure as below, even though the respondents are more than 10, all responses below 10 gets filtered out too (eg: Disagree - 2)

 

Filter2 = IF

( COUNT('Responses'[ID]) < 5,

1, 0 )

 

I then have a filter on the filter pane where I only display the condition '0'.

 

Does anyone have a solution to this? I want the stacked chart to either be blank or state 'as the responses are low, no data can be displayed due to data sensitivity' Can someone please help. Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @flare_11 ,

 

Please try the following formula:

Measure = 
var _percentage=DIVIDE(CALCULATE(COUNT('Table'[ID]),ALLEXCEPT('Table','Table'[Responses Type])),COUNTROWS(ALL('Table')))
return IF(COUNT('Table'[ID]) <5,0,_percentage)

The final output is shown below:
show blank.gif

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @flare_11 ,

 

Please try the following formula:

Measure = 
var _percentage=DIVIDE(CALCULATE(COUNT('Table'[ID]),ALLEXCEPT('Table','Table'[Responses Type])),COUNTROWS(ALL('Table')))
return IF(COUNT('Table'[ID]) <5,0,_percentage)

The final output is shown below:
show blank.gif

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous 

 

Thank you very much for your immediate response.

 

Is there a possiblity to hide all responses (including agree and neutral in the example provided) when the outcome(no. of response ID) of selected slicers is less that 5 table ID's?

 

Your support is much appreciated.

selimovd
Super User
Super User

Hello @flare_11 ,

 

can you maybe share how the tables in your data model look?

The description lets room for interpretation and that makes it harder to get to a solution.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Hi, As mentioned by Flare is it possible to hide the coomplete graph when the threshold is less than 5. Currently the above solution hides only responses.

Helpful resources

Announcements
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.