Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
Is it possible to create a conditional format on KPIs by row?
Or is there a workaround? I.e. could I create a new measure? The below KPI matrix table has different targets for different KPIs and I would like to shade to colours if out performing or underperforming.
Thanks
Alan
Solved! Go to Solution.
Hi @Alan_Gould ,
Is this what you are looking for?
You can try something like this measure. You will have to change the columns/tables/fields to match yours as well as add the extra KPIs. You will also need to change the performance range of what constitutes underperforming and overperforming. I added a "Red" and "Green" but you can change them to a hex code.
SWITCH (
TRUE (),
MAX ( 'Table'[Performance] ) < 80
&& MAX ( 'Table'[KPI ID] ) = "KPI1", "Red",
MAX ( 'Table'[Performance] ) < 90
&& MAX ( 'Table'[KPI ID] ) = "KPI2", "Red",
MAX ( 'Table'[Performance] ) < 90
&& MAX ( 'Table'[KPI ID] ) = "KPI3", "Red",
MAX ( 'Table'[Performance] ) < 70
&& MAX ( 'Table'[KPI ID] ) = "KPI4", "Red",
"Green"
)
Once you create the measure, add a conditional formatting on your Value Field; Format style should be "Field Value" and field based on should be your measure name e.g.:
Yes it would still work. You just add an extra condition e.g.
Hi @Alan_Gould ,
Is this what you are looking for?
You can try something like this measure. You will have to change the columns/tables/fields to match yours as well as add the extra KPIs. You will also need to change the performance range of what constitutes underperforming and overperforming. I added a "Red" and "Green" but you can change them to a hex code.
SWITCH (
TRUE (),
MAX ( 'Table'[Performance] ) < 80
&& MAX ( 'Table'[KPI ID] ) = "KPI1", "Red",
MAX ( 'Table'[Performance] ) < 90
&& MAX ( 'Table'[KPI ID] ) = "KPI2", "Red",
MAX ( 'Table'[Performance] ) < 90
&& MAX ( 'Table'[KPI ID] ) = "KPI3", "Red",
MAX ( 'Table'[Performance] ) < 70
&& MAX ( 'Table'[KPI ID] ) = "KPI4", "Red",
"Green"
)
Once you create the measure, add a conditional formatting on your Value Field; Format style should be "Field Value" and field based on should be your measure name e.g.:
Hi @m_alireza,
Quick question, how should I think about writing this if I wanted to have Red if below a certain value, but yellow if between Red and Green thresholds? Would the Switch function still be okay?
The results so far look great!
Thanks,
Alan
Yes it would still work. You just add an extra condition e.g.
Fantastic!
Works perfectly! Thank you very much 🙂
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
85 | |
83 | |
72 | |
49 |
User | Count |
---|---|
142 | |
139 | |
110 | |
69 | |
55 |