Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Conditional formatting compared to the previous month

Good morning I have a query: Is it possible to incorporate conditional formatting icons to an array that has as columns the months of management, rows a data "x" and as values the maximum of this...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Syndicate_Admin ,

     

    I have created a table for test:

    If you want to compare the value of current month and previous month, as set different icons for them, please try:

    Icon Measure = 
    var _previous= CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[CANAL]=MAX('Table'[CANAL]) && FORMAT([Date],"yyyy-mm")= FORMAT(EOMONTH(MAX('Table'[Date]),-1),"yyyy-mm" )))
    return SWITCH(TRUE(), SUM('Table'[Value])>_previous,"SignMedium", SUM('Table'[Value])=_previous,"SignLow","CircleHigh")

    Output:

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.