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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
IEG_CSC12
Frequent Visitor

Filter a chart based in a minium number of responses

Hello everybody,

 

I have a doubt about filters, i was trying to make a filter that will show the chart only if the amount of responses is greater then 3, if the chart have only 2 or 1 answer shouldn't not show the graph.

 

The problem is when I filter the graph, he is filter every answer and no the total of answers, for example:

The graph with two answers: Yes and No

If the graph have 2 yes and 1 no, it should appear for everyone, but if have only 1 yes and 1 no that graph shouldn't appear, but the problem is that the filter considerer the options separately.

 

I was using "DISTINCTCOUNT" to make a expression to filter the graph.

 

Is there a way to filter the minium of answer considering every answer?

 

Thanks!

1 ACCEPTED SOLUTION
ichavarria
Solution Specialist
Solution Specialist

Hi @IEG_CSC12,

 

You can filter the minimum number of answers considering every answer by using a measure that calculates the total number of responses and then applies the filter to the measure instead of the columns that contain the individual responses.

 

For example, let's say you have a table called "Survey" with columns "Response" and "RespondentID". You can create a measure called "Total Responses" with the following formula:

 

Total Responses = DISTINCTCOUNT(Survey[RespondentID])

 

This measure calculates the total number of unique RespondentIDs in the Survey table. You can then create another measure called "Show Chart" that checks if the Total Responses are greater than or equal to 3:

 

Show Chart = IF([Total Responses]>=3, "Yes", "No")

 

Now you can use the "Show Chart" measure to filter the chart. If the "Show Chart" measure returns "Yes", the chart will be displayed, and if it returns "No", the chart will be hidden. This way you are filtering the total number of responses rather than individual responses. 

 

 

Best regards, 

Isaac Chavarria

If this post helps, then please consider Accepting it as the solution and giving Kudos to help the other members find it more quickly

View solution in original post

1 REPLY 1
ichavarria
Solution Specialist
Solution Specialist

Hi @IEG_CSC12,

 

You can filter the minimum number of answers considering every answer by using a measure that calculates the total number of responses and then applies the filter to the measure instead of the columns that contain the individual responses.

 

For example, let's say you have a table called "Survey" with columns "Response" and "RespondentID". You can create a measure called "Total Responses" with the following formula:

 

Total Responses = DISTINCTCOUNT(Survey[RespondentID])

 

This measure calculates the total number of unique RespondentIDs in the Survey table. You can then create another measure called "Show Chart" that checks if the Total Responses are greater than or equal to 3:

 

Show Chart = IF([Total Responses]>=3, "Yes", "No")

 

Now you can use the "Show Chart" measure to filter the chart. If the "Show Chart" measure returns "Yes", the chart will be displayed, and if it returns "No", the chart will be hidden. This way you are filtering the total number of responses rather than individual responses. 

 

 

Best regards, 

Isaac Chavarria

If this post helps, then please consider Accepting it as the solution and giving Kudos to help the other members find it more quickly

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.