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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
deannapi
Frequent Visitor

Highlighting background comparing to total

I have a matrix built by Year-Month, Location Name, and a % value from dividing 2 measures.

I want to highlight cells per column if the cell is greater than it's total

 

The datatable looks like the following example  but with multiple years and Locations:

 

 

 

YearMonthLocationValue1Value2
2023JanuaryLocA40193714.33643966.62
2023FebruaryLocA31852406.97912116.34
2023MarchLocA35091429.05767218.08

 

Then I create a measure for Value2 / Value1

Year-MonthLocationA
20232.17%
January1.60%
February2.86%
March2.19%
Total2.17%

I now need to compare each row with it's column total:

   IF each cell is greater than the column Total, then highlight cell red

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @deannapi ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create measures.

total = CALCULATE([Measure],ALL('Table'))
color = IF([Measure]>[total],"red")

(3) Setting the Conditional Format and then the result is as follows.

vtangjiemsft_0-1709258778871.pngvtangjiemsft_1-1709258830468.pngvtangjiemsft_2-1709258840518.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @deannapi ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create measures.

total = CALCULATE([Measure],ALL('Table'))
color = IF([Measure]>[total],"red")

(3) Setting the Conditional Format and then the result is as follows.

vtangjiemsft_0-1709258778871.pngvtangjiemsft_1-1709258830468.pngvtangjiemsft_2-1709258840518.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

lbendlin
Super User
Super User

lbendlin_3-1709258291609.png

 

 

lbendlin_0-1709258178642.pnglbendlin_1-1709258217394.pnglbendlin_2-1709258232611.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.