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
I'm currently working on a KPI visual with two goals: the budgetted value & the value from the previous year. The previous year's value was calculated with a measure. Power BI has automatically colour coded it, but it doesn't look quite right for our purposes. We have data that spans a few years so we'd like it to change dynamically, hence why we can't simply use static values.
We'd like to see the card turn green when it's above the budgetted value (previous year is irrelevant!), yellow when it's below budget but above the previous year and red when it's below both. Currently the red colour works fine, but sometimes the KPI is yellow when we'd like it to be green. This occurs when the value is above budget but below the previous year. We can't seem to find an option in the colour coding tab that lets you fix this issue.
Does anyone have any ideas?
Regards,
Jasper
Solved! Go to Solution.
Hi,
You may not have given me the exact solution I was looking for, but you put me on the right track so thanks for that! I eventually managed to solve it by creating a measure:
This is an example of one of the snapshots with the wrong colour coding.
Hi @Anonymous ,
Have you configure right in the color coding?
Would you please show us sample pbix with the issue?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
I have, the main issue is in the fact that it isn't as simple as "high is good", "low is bad". The issue is in the yellow middle ground where I'd like to change it to green when actual is above target (TGT) but below PY. It should stay yellow when it's below target but above previous year (PY). Or in other words:
ACT>TGT & PY = Green
PY>ACT>TGT = Green
ACT < TGT & PY = Red
PY < ACT < TGT = Yellow
On the image I added you can see that it turns yellow when it's above target, which is not what I'd like to see.
I figured it would be possible in conditional formatting but I can't seem to find any options to change this. I can only use rules with static values I have to input myself and that does not seem to work for my purposes.
I can't seem to attach a file unfortunately but I think it's a fairly straight forward issue. The image shows my problem and I haven't really tinkered with the KPI setting at all.
Hi @Anonymous ,
As far as l know, the build-in kpi visual could have only one target value. how do you contain two target in your kpi visual and compare them?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi,
You can add a second goal by simply dragging your measure or column to the target goal field and put it below the other goal. So I have both my Target Column and PY measure in that data field, and my actuals in the Indicator field. Power BI will automatically colour a KPI with an indicator value between your two goals yellow. It's definitely a useful tool with multiple goals, but it's missing that one step for us at the moment. The conditional formatting pane is a tad confusing in Power BI so I might be missing something, which is why I asked here.
Regards,
Jasper
Hi @Anonymous ,
Thank you for explanation. The build-in kpi visual will not compare the indicator with the target value. It will not compare the values between your target values.
So in the situations below it will show yellow:
PY>ACT>TGT PY < ACT < TGT
As a workaround, you can use card visual and use the conditional formatting for the data color:
And create a measure for the color format like:
Measure = SWITCH(TRUE(),[ACT]>[TGT]&&[ACT]>[PY],"Green",[ACT]>[TGT]&&[ACT]<[PY],"Green",[ACT]<[TGT]&&[ACT]<[PY],"Red",[ACT]>[PY]&&[ACT]<[TGT],"Yellow")
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi,
You may not have given me the exact solution I was looking for, but you put me on the right track so thanks for that! I eventually managed to solve it by creating a measure:
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 |
---|---|
86 | |
84 | |
83 | |
67 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |