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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
agalbraith
Helper II
Helper II

Regulating a calculated measure by number of responses

I know it has been asked before that you cannot put a filter for response count on a card because a card is simply a measured calculation. But is there really no other work around or way to visualize such a thing in power bi overall? It seems like such an oversight in the program. Calculating an average based on the respondents in that data table is possible, yet we can't then make sure it only calculates for respondents greater than 5 or 10. The issue is when slicers pn the page are applied, then we get below the threshold of 5 we want to display within those certain slicer categories. Is there a different visual to use or work around for this? 

1 ACCEPTED SOLUTION
agalbraith
Helper II
Helper II

For anyone looking, I have found a solution to this via another help community. There are three things that must be done in order to filter the calculated measure by the count of responses:

1) Calculate your measure (whether it's an average, average x, division, multiplication, etc)

2) Calculate a count measure for the table using COUNTROWS

3) Calculate an IF measure using both the measure and the count measure within it as follows: 

CountIF = IF (Table [Name of count measure]>=5, Table[Name of calculated measure], BLANK() )

This third calculation is what you would display in a card or a bar chart. It will return all values under 5 responses as Blank and anything 5 or greater as the calculated measure.

 

It can be adjusted to just >5, >10 without the equals as well I just needed >= for my purposes. I realize it says >5 in the calculation but it behaves the opposite. When you type <5 it rather blanks all the numbers above 5 and only displays the ones below 5. I do not know the reason why it behaves opposite the symbol (I am not an expert in this program), but I just know that this has now been the solution to my needs!

 

I have a file example with dummy variables, but unfortunately do not see a place to attach a file.

View solution in original post

7 REPLIES 7
agalbraith
Helper II
Helper II

For anyone looking, I have found a solution to this via another help community. There are three things that must be done in order to filter the calculated measure by the count of responses:

1) Calculate your measure (whether it's an average, average x, division, multiplication, etc)

2) Calculate a count measure for the table using COUNTROWS

3) Calculate an IF measure using both the measure and the count measure within it as follows: 

CountIF = IF (Table [Name of count measure]>=5, Table[Name of calculated measure], BLANK() )

This third calculation is what you would display in a card or a bar chart. It will return all values under 5 responses as Blank and anything 5 or greater as the calculated measure.

 

It can be adjusted to just >5, >10 without the equals as well I just needed >= for my purposes. I realize it says >5 in the calculation but it behaves the opposite. When you type <5 it rather blanks all the numbers above 5 and only displays the ones below 5. I do not know the reason why it behaves opposite the symbol (I am not an expert in this program), but I just know that this has now been the solution to my needs!

 

I have a file example with dummy variables, but unfortunately do not see a place to attach a file.

Greg_Deckler
Community Champion
Community Champion

@agalbraith Just include the filter logic in your measure like:

Measure = CALCULATE(AVERAGE('Table'[Column]), [Column1] > 5)



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Sorry I should also point out it's a weighted average. Could I do the same?

Would it look like this:

AVERAGEX(Table, Table[Value] >5)

sorry forgot to at you @Greg_Deckler . I tried the weighted average with the >5 and that didn't work how I had it written

@agalbraith Is the weighted average a measure? If so, wrap your filter parameter in FILTER.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler yes it's a measure. Can you give me an example of how I would write the dax with the FILTER command?

@agalbraith Measure = CALCULATE(AVERAGE('Table'[Column]), FILTER([Measure] > 5))



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.