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
krishb1414
Helper III
Helper III

Color Formatting Top N with multiple drill down

Hi everyone, 

 

I need a help , I m trying to achieve color formatting top 3 categories while drill down.

 

For example category I want top 3 values as red and others are blue. When I drill down to sub category1, I want to see top 3 values as red and others are blue. Again if I drill down sub category 2 then same I have to see.

 

can anyone help on this ?

2 REPLIES 2
krishb1414
Helper III
Helper III

Hi @amitchandak  This is working for bar graph but it is not working for decomposition tree visual, can you help me how to do that ?

amitchandak
Super User
Super User

@krishb1414 , First of that you need to switch rank based on isinscope and color based on that too

 

Assume yiu have three rank Var or measures

example

Cat Rank = rankx(allselected(Dim[Category]), [Measure],,desc,dense) // same way others

 

Switch(True() ,

isinscope(Dim[Sub Category 2]) , [Sub Cat2 Rank],

isinscope(Dim[Sub Category 1]) , [Sub Cat1 Rank],

isinscope(Dim[Category]) , [Cat Rank]

)

 

Same way create color measure and use that in conditional formatting using field value option

 

Switch(True() ,

isinscope(Dim[Sub Category 2]) &&  [Sub Cat2 Rank] <= 3, "Red",

isinscope(Dim[Sub Category 1]) &&  [Sub Cat1 Rank]<= 3, "Red",

isinscope(Dim[Category]) &&  [Cat Rank] <= 3, "Red", "Blue"

)

 

 

IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.