Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Matrix conditional formatting if value is lower then previous year then red

Hey guys, I have a matrix which displays  count of shipments per month for 2018 and 2019 so for example the row for june will contain 2 numbers that of 2018 and 2019.   Now if the count of shipmen...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Managed to fix it by instead of count using sum in the formale since my table already"counts" the values. 

    Condittional formatting =
    SWITCH (
    TRUE (),
    SUM('Export'[COUNT] )
    < CALCULATE (
    SUM('Export'[COUNT] ),
    SAMEPERIODLASTYEAR ( DateTable[Date])
    ), "#ff8800")
    final result
    Extra credit to MFelix  for all the help provided!