Forum Discussion

Alpesh's avatar
Alpesh
Helper I
1 year ago
Solved

Colour Format Measure - Multiple % Change Measures

Hi, I've got lots of metrics on my social media accounts and need the % Change colours formating. Since we have different brands, I want the % changes to be formatted in colour. However, I am using t...
  • rajendraongole1's avatar
    1 year ago

    Hi Alpesh - you can simplify the color formatting by using a dynamic approach that doesn't require you to manually check each metric.

    create each of your metrics has a corresponding % change measure. I have just segregatted the above measure dynamically to pic the same hexacode. please check and use below:

     

    Color Format =
    SWITCH(
    TRUE(),
    SELECTEDVALUE([% Change Followers]) > 0, "#73B761",
    SELECTEDVALUE([% Change Reach]) > 0, "#73B761",
    SELECTEDVALUE([% Change Sentiment]) > 0, "#73B761",
    SELECTEDVALUE([% Change Shares]) > 0, "#73B761",
    SELECTEDVALUE([% Change Comments]) > 0, "#73B761",
    SELECTEDVALUE([% Change Likes]) > 0, "#73B761",
    SELECTEDVALUE([% Change Engagements]) > 0, "#73B761",
    SELECTEDVALUE([% Change Followers]) <= 0, "#D82C20",
    SELECTEDVALUE([% Change Reach]) <= 0, "#D82C20",
    SELECTEDVALUE([% Change Sentiment]) <= 0, "#D82C20",
    SELECTEDVALUE([% Change Shares]) <= 0, "#D82C20",
    SELECTEDVALUE([% Change Comments]) <= 0, "#D82C20",
    SELECTEDVALUE([% Change Likes]) <= 0, "#D82C20",
    SELECTEDVALUE([% Change Engagements]) <= 0, "#D82C20"
    )

     

    you can reuse the Color Format measure for each one if you have multiple new card visual, the above approach helps and saves the time.

     

    Hope it helps.