Forum Discussion
COUNTIF based on Averages in displayed table
It's the same idea in Power BI. You create a measure that uses the same rules as your color coding.
Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- Sportily3 years agoFrequent Visitor
Hi,
Thanks for the reply.Nice to know if may be possible. Although I'm not sure I know what to do from your description.
For the conditional formatting I apply this using the tool in each value displayed in the table.I've mocked this up in Excel showing the COUNTIF based on the AVERAGE figues displayed in a table, filtered from a dataset.
Here : shorturl.at/aftU4Thanks so much
- lbendlin3 years ago
Super User
Like this ?
Or do you want to count this across columns PLAN and EAT? In that case you need to unpivot your data first.
- Sportily3 years agoFrequent Visitor
Thanks.
Yes, The measure would be COUNTIF( Average of [Plan] and Average of [Eat], >-4 )
So it would deliver either 0, 1, 2 as the answers.
In your example Mark would be a 0 and Simon would be a 1.
The colour coding is achieved using conditional formatting and works fine currently. But I didnt know if there was a way to COUNTIF( cells in the row are background colour green ) as an alternative to counting the averages >-4.
Thanks for your interest.
Chris