Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I am trying to create conditional formatting for the data below such that when a value for a row is compared to the previous column (same row) and if it is less than the previous the icon is red and if it is higher it is green
I am not seeing a way to do that with the conditional formatting options of thematrix table:
Solved! Go to Solution.
What do you mean by previous column? You want to have Day or day change measure.
Create date dimension. Create a day lag measure, create a diff measure and use that for color formatting.
Sales = CALCULATE(SUM(Sales[Sales Amount]))
Daybehind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Day))
Diff =[Daybehind Sales] -[Sales]
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
Thanks for that, I almost have it working using the measure above, however it seems like it is not always displaying the correct icon when it comes to the orange one (when the value did change from one to day to the next)
My measure:
Measure =
var current_day = MAX(Query1[Cost])
var last_day = CALCULATE(MAX(Query1[Cost]),
DATEADD(Query1[Date],-1,DAY))
return IF(current_day-last_day>0,1,IF(current_day-last_day=0,0,IF(current_day-last_day<0,BLANK())))
The cond formatting:
Do you see anything wrong there?
It might be also due to the fact that I have multiple cost entries for thesame rows and they need to be added up, for example I can have 20 rows with the same date/product but different cost entries and they need to be added together?
What do you mean by previous column? You want to have Day or day change measure.
Create date dimension. Create a day lag measure, create a diff measure and use that for color formatting.
Sales = CALCULATE(SUM(Sales[Sales Amount]))
Daybehind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Day))
Diff =[Daybehind Sales] -[Sales]
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |