Forum Discussion

ashmitp869's avatar
ashmitp869
Responsive Resident
2 years ago
Solved

Help needed in dax expression - for Conditional Formating for background color.

Hi All,   Help needed for  Conditional Formating for background color.   My requirement :   =if(Len([PTD - Revenue Accrual (Ex-GST)])>0 and [PTD - Revenue Accrual (Ex-GST)]<>'-', if([PTD - Reve...
  • ashmitp869's avatar
    ashmitp869
    2 years ago

    Thanks for the help..

    PTD - Revenue Accrual Color =  
    SWITCH(
            TRUE(),
            AND(
                LEN([PTD - Revenue Accrual(Ex-GST)]) > 0, 
                [PTD - Revenue Accrual(Ex-GST)] <> BLANK()
            ),      IF(
                [PTD - Revenue Accrual(Ex-GST)] > ([MTD Total - Revenue(Ex-GST)] * 0.3), 
               "#FFC7CE"  // This is a hex color code for a shade of red
            ),
            BLANK()
        )

    instead of "-" I used Blank()