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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Output value based on a conditional count of other values

Hi,

 

I have a table that contains columns called Category, Sub-Category, Criteria and RAGB (Red, Amber, Green, Blue). RAGB is applied to the criteria and what I want to do is say that if there’s X Criteria with a RAGB of Red (within that Sub-Category) then output “Red”, if X with Amber output “Amber”, if X with Green output “Green” and finally when all the criteria are Blue output “Blue”. This will then be used to change the colour of the Sub-Category card on the report accordingly. I then want to do the same again but for the Sub-Categories to drive the colour of the Category card e.g. if X are Red output “Red” etc. etc. (again finishing with when they’re all Blue output “Blue” the same as for the criteria).

 

For clarity I have four different categories containing 8, 4, 11 & 8 sub-categories respectively (all with different names) and then each sub-category contains a different number of unique criteria.   

 

I’ve been scratching my head as to how to best achieve this (if at all!) can anyone suggest a solution please?

 

Many thanks.

2 REPLIES 2
olgad
Super User
Super User

a bit hard to imagine what you want , may be you can show a part of your data and then just on a snapshot color it the way you want. let me know, i do lots of custom formatting and coloring on the reports.


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
Anonymous
Not applicable

Thanks for the quick response and sorry the question wans't clear, does the below help? 

 

In hindsignt I'm thinking it might be better to apply a weighting to each of the RAGB colours to drive the sub-category and category results from. E.g. if a sub-category scores 0-10 it's green, 11-20 it's amber over 20 it's red and then the same for the overall category? 

 

The sub-category and category results are what I'm trying to generate from the data I have, I "think" I'm then ok with the report side using those values...

 

JSAV1985_0-1678294476524.png

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors