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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
taylorb
Helper I
Helper I

Conditional Formatting a Matrix to Compare with Previous Row

I have data in a matrix and I want to add an icon that shows if it is higher or lower than the previous row. It looks like the only option is to compare the individual row to the highest and lowest values over all.

 

hotdogs.png

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@taylorb 

I am assuming you have a measure that adds up the amounts in your table like.

SUM = SUM ( YourTable[Amount] )

And also that you have a dates table in your model.  If so you can write a measure like this.

 

Change from Prior Day = 
[SUM] - 
CALCULATE([SUM],DATEADD(Dates[Date],-1,DAY))

Then use that in a conditional formatting rule on the [Sum] value in your visual.

jdbuchanan71_1-1613601097295.png

jdbuchanan71_2-1613601200596.png

Here is the result.

jdbuchanan71_3-1613601244393.png

 

 

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@taylorb 

I am assuming you have a measure that adds up the amounts in your table like.

SUM = SUM ( YourTable[Amount] )

And also that you have a dates table in your model.  If so you can write a measure like this.

 

Change from Prior Day = 
[SUM] - 
CALCULATE([SUM],DATEADD(Dates[Date],-1,DAY))

Then use that in a conditional formatting rule on the [Sum] value in your visual.

jdbuchanan71_1-1613601097295.png

jdbuchanan71_2-1613601200596.png

Here is the result.

jdbuchanan71_3-1613601244393.png

 

 

 

This works! Thanks!

Helpful resources

Announcements
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!

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.

Top Solution Authors
Top Kudoed Authors