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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aflintdepm
Helper III
Helper III

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

 

6 REPLIES 6
byvind
Regular Visitor

Hello,

 

has this been solved?

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

marcofalzone
Helper I
Helper I

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

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

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.

v-jingzhang
Community Support
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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.