Forum Discussion
vivran22
7 years agoCommunity Champion
Customized Conditional Formatting (Using DAX)
Hi, I am working on designing a solution and need help. There are two facts table: Data and Target. For certain KPIs, I need to compare Yearly/Monthly/Daily actual vs target. I am looking...
- 7 years agoI had the same issue, forgot to mention you need to transform your column where you define lower is better to number.
Referring to the column on the measures selection.
Regards,
MFelix
MFelix
7 years agoSuper User
hI vivran22 ,
You can use one of the two measure below to make your condittional formatting:
Conditional Low and High =
SWITCH (
TRUE ();
SUM ( Data[KPI_Value] ) > SUM ( Target[KPI_Value] )
&& SELECTEDVALUE ( 'KPI'[Lower The Better] ) = 0; "#f44242";
SUM ( Data[KPI_Value] ) < SUM ( Target[KPI_Value] )
&& SELECTEDVALUE ( 'KPI'[Lower The Better] ) = 0; "#5ff442";
SUM ( Data[KPI_Value] ) < SUM ( Target[KPI_Value] )
&& SELECTEDVALUE ( 'KPI'[Lower The Better] ) = 1; "#f44242";
SUM ( Data[KPI_Value] ) > SUM ( Target[KPI_Value] )
&& SELECTEDVALUE ( 'KPI'[Lower The Better] ) = 1; "#5ff442";
"#f44242"
)
Conditional Low and High =
IF(SELECTEDVALUE('KPI'[Lower The Better]) = 1 ; [Revenue KPI Color (LTB)]; [Revenue KPI Color (HTB)]
)
Not sure if the order is correct based on your file but the colours change when compared to the visuals you have on your report.
Regards,
MFelix