Forum Discussion
Conditional Formatting basede on previous values the Matrix columns
- 7 years ago
You can create this measure:
Icon =
VAR _val =
CALCULATE ( SUM ( Sales[Sales] ) )
-
CALCULATE ( SUM ( Sales[Sales] ),
PREVIOUSMONTH ( 'DateTime'[Date] ) )
RETURN
SWITCH ( TRUE (),
_val < 0, -1,
_val = 0, 0,
_val > 0, 1 )Change the RED to match your columns!
Then, on your matrix, go to the format properties.
Under conditional formatting, select the column and turn on icons, then click advanced editor:In advanced controls, select the following options:
Want even more help with icons?! Check this awesome blog!
https://powerbi.tips/2019/07/icons-upon-icons/
Happy icon-ing :catlol: :womantongue: :robotlol:
You can create this measure:
Icon =
VAR _val =
CALCULATE ( SUM ( Sales[Sales] ) )
-
CALCULATE ( SUM ( Sales[Sales] ),
PREVIOUSMONTH ( 'DateTime'[Date] ) )
RETURN
SWITCH ( TRUE (),
_val < 0, -1,
_val = 0, 0,
_val > 0, 1 )
Change the RED to match your columns!
Then, on your matrix, go to the format properties.
Under conditional formatting, select the column and turn on icons, then click advanced editor:
In advanced controls, select the following options:
Want even more help with icons?! Check this awesome blog!
https://powerbi.tips/2019/07/icons-upon-icons/
Happy icon-ing :catlol: :womantongue: :robotlol:
- samcasce7 years agoNew Member
Hi Steve, This solution is perfect!!
Thank's
- MarlonK5 years agoHelper I
Is there a way to do this comparison against the previous week instead of the previous month?
I noticed there is no PREVIOUSWEEK() function...
Thanks!
- lewisdjl4 years agoFrequent Visitor
Hi - when I follow this solution all my formatting is returning an increase from the previous month - even when there's a decrease in value. I added the measure to a matrix and all the values are 1.
My date field is in Date format and I've also tried when set to DateTime.
Can you help please?Many thanks