Forum Discussion
samcasce
7 years agoNew Member
Conditional Formatting basede on previous values the Matrix columns
Hi, can someone tell me if we can format the values of the Matrix as required: The Icon un each row depends of value on the previous column on that same row.
- 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:
Anonymous
5 years agoNot applicable
How does this work for colums with weeknumbers? There is no "previousweek" formula in PBI 😞
I use this formula:
Icon =
VAR _val =
CALCULATE ( SUM ( Datagrunnlag[Antall solgt]) )
-
CALCULATE ( SUM ( Datagrunnlag[Antall solgt] ),
Dates[Weeknumber]-1)
RETURN
SWITCH ( TRUE (),
_val < 0, -1,
_val = 0, 0,
_val > 0, 1 )
See screenshot