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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
TomerIwanir1
Helper II
Helper II

Different colors at total rows - metrix visual

Hi all

I have a metrix visual with several totals (below pic) which currently all grey, I want for each total level a different color and I tried it under "Rows subtotals" -- > choose a level but than my "values" is blocked (pic attached), any ideas ?

thx

TomerIwanir1_0-1730098131335.png

 

TomerIwanir1_1-1730098152998.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi FreemanZ, thanks for the quick reply, I'll add more.

Hi @TomerIwanir1 ,

Please use the 'ISINSCOPE' function to determine the row level. Then work with the conditional format to set the color.

ISINSCOPE function (DAX) - DAX | Microsoft Learn

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

vzhouwenmsft_0-1730168787137.png

vzhouwenmsft_1-1730168818408.png

Measure = 
VAR _level1 = ISINSCOPE('Table'[level1])
VAR _level2 = ISINSCOPE('Table'[level2])
VAR _level3 = ISINSCOPE('Table'[level3])
RETURN 
SWITCH(TRUE(),
_level3 = FALSE() && _level2 = TRUE(),"red",
_level2 = FALSE() && _level1 = TRUE(),"green",
"Yellow"
)

Final output

vzhouwenmsft_2-1730168861568.png

Best Regards,
Wenbin Zhou

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi FreemanZ, thanks for the quick reply, I'll add more.

Hi @TomerIwanir1 ,

Please use the 'ISINSCOPE' function to determine the row level. Then work with the conditional format to set the color.

ISINSCOPE function (DAX) - DAX | Microsoft Learn

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

vzhouwenmsft_0-1730168787137.png

vzhouwenmsft_1-1730168818408.png

Measure = 
VAR _level1 = ISINSCOPE('Table'[level1])
VAR _level2 = ISINSCOPE('Table'[level2])
VAR _level3 = ISINSCOPE('Table'[level3])
RETURN 
SWITCH(TRUE(),
_level3 = FALSE() && _level2 = TRUE(),"red",
_level2 = FALSE() && _level1 = TRUE(),"green",
"Yellow"
)

Final output

vzhouwenmsft_2-1730168861568.png

Best Regards,
Wenbin Zhou

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.