Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Alpesh
Helper I
Helper I

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 the Card "new" to visualise the metrics and reference values for the % Change.  However, it will take a very long time using the reference values formatting as there are 4 "% Changes": TV vs. Last year, prev. month vs. month prior, qtr vs. last qtr, last qtr vs. YAG. Then I have the following metrics: Followers, reach, sentiment, shares, comments, likes, engagements......

 

 Is there an easy measure I can use as the colour format? I tried the below but it did not work...

Colour Format = SWITCH(TRUE(),
                    [Engagement Rate (% chg qtr vs. prev. qtr.)] >= 0.0, "#73B761",
                    [Engagement Rate (% change vs. YAG)] >= 0, "#73B761",
                    [Engagements (% change qtr vs. YAG)] >= 0, "#73B761",
                    [Engagements (% chg qtr vs. prev. qtr.)] >= 0, "#73B761",
                    [Followers (% change qtr vs. prev. qtr.)]>= 0, "#73B761",
                    [Followers (% change qtr vs. YAG)] >= 0, "#73B761",
                    [IG Post Saves (% chg qtr vs. prev. qtr.)]>= 0, "#73B761",
                    [IG Post Saves (% chg qtr vs. YAG)]> 0, "#73B761",
                    [Likes + Reactions (% chg qtr vs. YAG)]> 0, "#73B761",
                    [Likes + Reactions (% chg vs. prev. qtr.)]> 0, "#73B761",
                    [Net Sentiment (chg qtr vs. prev. qtr.)]> 0, "#73B761",
                    [Net Sentiment (chg qtr vs. YAG)]> 0, "#73B761",
                    [Reach (% chg qtr vs. prev. qtr.)]> 0, "#73B761",
                    [Reach (% chg qtr vs. YAG)]> 0, "#73B761",
                    [Shares (% chg qtr vs. prev. qtr.)]> 0, "#73B761",
                    [Shares (% chg qtr vs. YAG)]> 0, "#73B761",
                    [Video Views (% chg qtr vs. prev. qtr.)]> 0, "#73B761",
                    [Video Views (% chg qtr vs. YAG)]> 0, "#73B761",
                    [Engagement Rate (% chg qtr vs. prev. qtr.)] <= 0.0, "#D82C20",
                    [Engagement Rate (% change vs. YAG)] <= 0, "#D82C20",
                    [Engagements (% change qtr vs. YAG)] <= 0, "#D82C20",
                    [Engagements (% chg qtr vs. prev. qtr.)] <= 0, "#D82C20",
                    [Followers (% change qtr vs. prev. qtr.)]<= 0, "#D82C20",
                    [Followers (% change qtr vs. YAG)] <= 0, "#D82C20",
                    [IG Post Saves (% chg qtr vs. prev. qtr.)]<= 0, "#D82C20",
                    [IG Post Saves (% chg qtr vs. YAG)]< 0, "#D82C20",
                    [Likes + Reactions (% chg qtr vs. YAG)]< 0, "#D82C20",
                    [Likes + Reactions (% chg vs. prev. qtr.)]< 0, "#D82C20",
                    [Net Sentiment (chg qtr vs. prev. qtr.)]< 0, "#D82C20",
                    [Net Sentiment (chg qtr vs. YAG)]< 0, "#D82C20",
                    [Reach (% chg qtr vs. prev. qtr.)]< 0, "#D82C20",
                    [Reach (% chg qtr vs. YAG)]< 0, "#D82C20",
                    [Shares (% chg qtr vs. prev. qtr.)]< 0, "#D82C20",
                    [Shares (% chg qtr vs. YAG)]< 0, "#D82C20",
                    [Video Views (% chg qtr vs. prev. qtr.)]< 0, "#D82C20",
                    [Video Views (% chg qtr vs. YAG)]< 0, "#D82C20")

 

Example of the report:

Alpesh_1-1724061233839.png

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.