Forum Discussion

aflintdepm's avatar
aflintdepm
Helper III
3 years ago

Conditional Formatting by Field Value for multiple measures

I have 5 measures that all use the same scale for for conditional formatting.

 

The measures are (all %):

  • Submitted in 1 day
  • Completed in 3 days
  • Completed in 5 days
  • Completed in 10 days
  • Completed in 15 days

 

I want to use the same formatting scale for each of these

<80% = Red

80-99% = Yellow

99-100% = Green

 

Is there a way to write a measure that I can use across all of these to get the same formatting?

 

Currently, I have a formatting measure for each one that looks like this

% Completed 10 days Format = SWITCH(
    TRUE(),
    [% Completed in 10 Days]<=0.8, "#FDBAB8",
    [% Completed in 10 Days] >=.99, "#b4e0b2",
    "#f0e199")
 
I just change the reference inside the [ ] to make a new one.  What I would like is 1 rule that would work regardless of the measure name inside the bracket.
 
Thanks for the help

 

7 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi aflintdepm 

     

    I tried to use calculation groups to deal with this but failed sadly. Not sure if this is possible with calculation groups. Or I don't have enough experience to find a workaround. 

     

    Best Regards,
    Community Support Team _ Jing

  • Hi, I'm investigating exactly the same issue. Only one measure to be used as conditional field for many measures. 
    Did you find any solution or workaround in the meanwhile?

    thank you.

    Marco

    • aflintdepm's avatar
      aflintdepm
      Helper III

      Unfortunaely, I've made no headway on this.  I spent about an hour duplicating the measure for each thing I wanted to format.  

      • marcofalzone's avatar
        marcofalzone
        Helper I

        Thanks for your feedback; I'm investigating a way to do it through some C# script. Not yet sure if it's possible or not, but I will let you know.

    • aflintdepm's avatar
      aflintdepm
      Helper III

      The only solution I found was to create a separate measure for each item I wanted to format and then select the specific measure for the specific column that I needed to format.  If you only have a few columns, it's annoying but not prohibitive.  If you have a lot of columns, it will be a beast