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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

KPI visual does not apply color correctly

I have used KPI visuals in the past and I have a problem with one specific application where the color coding rules are weirdly applied.

This is the exact same visual, nothing's changed except the filters applied and the measure used for the color coding is the same as the one displayed as callout value.

FireFighter1017_0-1669752565785.png

FireFighter1017_1-1669752582164.png

This KPI shoould be green when the value is below the target, and gradient from yellow to red when the value is 20 to 30 and red when over 30.

FireFighter1017_2-1669752609311.png

I tried with a simple 2 color gradient

FireFighter1017_3-1669752624988.png

Then figured out that values over 30 may not get applied correctly, so I added a middle value:

FireFighter1017_4-1669752841122.png

 

But still, without any filters applied other than the standard filters, 30,5 still turns up as yellow-ish.

Standard filters implies a relative date filter on the last 52 calendar weeks, and a divsion filter

Here's the visual's data table:

FireFighter1017_5-1669752962993.png

I also tried recreating this visual from scratch ending up with the same result.

After playing with different filters and analyzing the results, it looks like it is not using the last value for color coding but rather the whole table of values.  Because as soon as I start filtering out the first dates, the color changes towards red...

This used to work like a charm a year ago...

 

Now I have found a way to make this work using Rules only:

FireFighter1017_6-1669754030816.png

 

But then it's the other way around that does not work anymore... 

FireFighter1017_0-1669754467902.png

As per rules defined previously, this should be yellow.. 😞

 

Status: Needs Info

Hi @FireFighter1017 ,

 

What's your version of your power bi desktop? If not the latest version, please update to the latest.

 

Best regards,

Community Support Team Selina zhu

Comments
v-mengzhu-msft
Community Support
Status changed to: Needs Info

Hi @FireFighter1017 ,

 

What's your version of your power bi desktop? If not the latest version, please update to the latest.

 

Best regards,

Community Support Team Selina zhu

FireFighter1017
Advocate II

FireFighter1017_0-1669915418101.png

I think it's the latest.  At least it is the latest version IT just deployed on my computer.

And just so you know, it is not only doing that on Power BI Desktop.  It is also doing it on Power BI Service as well.

I have found another scenario that seems to be working in certain conditions.

Every week we take a snpashot of orders in the backlog, and we get the aging of each order.  This KPI visual is supposed to give us the latest snapshot's average age of orders in this snapshot, as well as the past weeks trend in the background.

I had this measure that is basically AVERAGE(Fact_Backlog[Aging]) that I was using as the value of this KPI and also as the field for color coding rules.

Since it looked like the visual is taking all values into account when setting the color coding, I have modified the measure so that every time the measure is evaluated, it could only see one week at a time:

_tmp Backlog \ Average WO Age = 
VAR _enddate =
    MAX ( Fact_Backlog[SnapshotDate] )
RETURN
    CALCULATE (
        AVERAGE ( Fact_Backlog[Aging] ),
        FILTER (
            Fact_Backlog,
            Fact_Backlog[SnapshotDate] = _enddate
        )
    )

It seems to be working with the color coding for now.

But this visual definitely didn't behave this way before.

Now I'll have to review all the reports where I have used this visual to make sure it does'nt behave like this.

FireFighter1017
Advocate II

Any updates on this? 

 

I'm having this issue now with other measures as well.

This is not the expected behavior.  The color coding should be using the callout value to determine the trend axis colors.

 

Please fix this

FireFighter1017
Advocate II

The issue also happens in Power BI Service

FireFighter1017
Advocate II

Hi @v-mengzhu-msft ,

 

I have not heard back from you since I have posted my Power BI version.

This is still flagged as "Needs info".

What else do you need to diagnose this problem?

We really need this KPI to work properly, otherwise we will have to create color-coding measures whic doesn't make sense to me.