Forum Discussion
Conditional Formatting for Column Color based on different KPIs
- 1 year ago
Hi Anonymous
I've written this so you can make them all seperate tests if you want to using the individual switches.
Color Change MC Eff. =
VAR currMeasure =
SELECTEDVALUE ( 'KPI'[KPI] )
RETURN
SWITCH (
currMeasure,
"MC Efficiency (%)", SWITCH ( TRUE (), [MC Efficiency (%)] > [MC Efficiency T], "Green" ,"Red"),
"Weigher Efficiency (%)", SWITCH ( TRUE (), [Weigher Efficiency (%)] > [Weigher Efficiency T], "Green","Red" ),
"GGA", SWITCH ( TRUE (), [GGA (gm)] < [GGA T], "Green","Red" ),
"Film Waste (%)", SWITCH ( TRUE (), [Film Waste (%)] < 'Film Waste (%)'[Film Waste T], "Green","Red" ),
"R&M", "orange",
"Operating Supplies", "orange",
"Red" --If anything else
)
Hi Anonymous
I've written this so you can make them all seperate tests if you want to using the individual switches.
Color Change MC Eff. =
VAR currMeasure =
SELECTEDVALUE ( 'KPI'[KPI] )
RETURN
SWITCH (
currMeasure,
"MC Efficiency (%)", SWITCH ( TRUE (), [MC Efficiency (%)] > [MC Efficiency T], "Green" ,"Red"),
"Weigher Efficiency (%)", SWITCH ( TRUE (), [Weigher Efficiency (%)] > [Weigher Efficiency T], "Green","Red" ),
"GGA", SWITCH ( TRUE (), [GGA (gm)] < [GGA T], "Green","Red" ),
"Film Waste (%)", SWITCH ( TRUE (), [Film Waste (%)] < 'Film Waste (%)'[Film Waste T], "Green","Red" ),
"R&M", "orange",
"Operating Supplies", "orange",
"Red" --If anything else
)