Forum Discussion

Emma_'s avatar
Emma_
Icon for Helper II rankHelper II
10 months ago
Solved

Dynamic formatting color scale

Hello, I am looking for an option to create a dynamic formatting based on the scale defined by min and max value of my sales measure. At the moment the scale is just a static image so depending on the selected/filtered values colors are not the most accurate. This is used for a shape map. Do you know if I could create this scale dynamically with any visual? Setting up rules and tresholds will not work because the ranges change a lot depending on the selection. Thats why I would like to incorporate min & max measures. Thanks a lot!

 

  • There's not really enough detail to provide a good solution.

    But, rather than thinking about the rules as ranges or thresholds, you could treat them as percentage of totals ranges.

    Then use a SWITCH statement to define the colors between these percentages. That way, the colors will respect the values based on selection.

     

3 Replies

  • Hi 

    Create measure called flag with below formula

    Flag=if [Sales] >=MIn(Sales) and [Sales]<= Max(Sales) then 1 else 0 end

    Then use this Flag is conditional formatting for selection of colors.

     

    Hope it helps.

    Thanks

  • srlabhe thanks for the tip. I will try this. can you elaborate on this? where/in which way should I actually use it?

    Then use this Flag is conditional formatting for selection of colors.

     

    thank you

  • There's not really enough detail to provide a good solution.

    But, rather than thinking about the rules as ranges or thresholds, you could treat them as percentage of totals ranges.

    Then use a SWITCH statement to define the colors between these percentages. That way, the colors will respect the values based on selection.