Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
zbalder
Frequent Visitor

Dynamic Color Direction in KPI

Hey guys, do you have a workaround to dynamicly toggle the "Color Direction" option in a KPI? I have a table where depending on a flag some records will be displayed as "High is good" but some others should display as "Low is good".

 

Thanks for your help!

5 REPLIES 5
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@zbalder,

Could you please share dummy data of your table and display these good records here?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lydia,

 

Here is some sample data, the idea is that the user will have a drop down (slicer) with the codes in it and select each code to see different charts and info about how each code is doing over time, the Dim table has the Code Name, Type of Code and Target Goal, the Fact table has the Amount and the Date.

 

CodeAmountTarget GoalType of Code
# of registrations54Good is high
# of cancellations31Good is low
# of applications68Good is high
# of rejections21Good is low

 

So for example when the user selects "# of registrations" I want my KPI to look Green (Good color) as 5 is over the Target and Good is high.

But when the users select "# of cancellations" I want to the KPI to look Red (Bad Color) as 3 is over the Target Goal of 1, or if there were 0 # of cancellations then it will display Green (Good Color) as the value would be under the Target.

 

Does that make sense?

 

Thanks! 

@zbalder,

A workaround is to create the following columns in your table and create KPI as follows.

Column = IF(Table[Type of Code]="Good is low",0-Table[Amount],Table[Amount])
Column 2 = IF(Table[Type of Code]="Good is low",0-Table[Target Goal],Table[Target Goal])


1.JPG
Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Lydia, I had thought about this solution, but displaying negative values in the KPI won't be an acceptable visual for the user, I think there is no way, do you know how easy will it be to modify the current KPI Visual to accept a field in the Direction option?

@zbalder,

I can't think other method to achieve your requirement.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.