Forum Discussion
COUNTIF based on Averages in displayed table
Like this ?
Or do you want to count this across columns PLAN and EAT? In that case you need to unpivot your data first.
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
- lbendlin3 years agoSuper User
You cannot count the background colors per se, but as I have shown above you can have an explicit measure that creates the background color, and another parallel measure with the same logic that counts the occurrences.
Please provide sample data that covers more of your scenarios, and indicate the expected outcome.