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.
I am trying to do conditional formatting with multiple criteria.
Each client has a different service levels to meet. For example, Client A, B, C need to be coloured green if the service level measure is greater or equal to 80% and coloured red if below, Client D would be green if service level measure is greater or equal to 75% and red if below, and so forth. The standard conditional formatting doesn’t work as far as I can tell given there are different threshold based on client.
In this chart here, how would I make client D red, knowing the 74.07% is below the 75% service level requirement.
Note sure if it helps, but this is the measure I used to calculate the service level.
Service Level =
var SL = DIVIDE(sumx (RCCalls, RCCalls[Answered_InSVL] ), sumx (RCCalls, if( RCCalls[ClientName] = "ClientD", RCCalls[Offered]-RCCalls[Short_Abandoned], RCCalls[Answered]) ))
return SL
In addition to the Service Level measure, I’ve tried creating a new measure and a new column with switch statements, and nested if statements but I don’t even come close, so apologies for lack of code for the actual measure to aid with the conditional formatting.
Solved! Go to Solution.
@BenBrubacher , You can create a color measure based on client and SL% and return a color.
Check example
color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"blue",
// Add more conditions
"red"
)
Then use that in coditional formatting using "Field Value" Option
refer these links for steps
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
@BenBrubacher , You can create a color measure based on client and SL% and return a color.
Check example
color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"blue",
// Add more conditions
"red"
)
Then use that in coditional formatting using "Field Value" Option
refer these links for steps
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
Thank you so much, worked perfectly!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |