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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

KPI Conditional Formatting

HI All,

 

I am using a KPI to color green, red, orange from two fields which use dynamically changing data ie. the value changes. But when the value change the KPI displays the wrong color.

 

Desired Logic;

IF (B-A)>0, THEN [Green]

IF(B-A) <0, THEN [Red]

IF(B-A)=0, THEN [Orange]

 

You can see in screen shot that B is larger than A but it is red.

Second screen shot shows the fields used for A.

 

pic1.PNG

 

 

 

 

 

 

 

 

 

pic2.PNG

 

 

 

 

 

 

 

 

These columns are in different data sets. So we are unable to do a merge join or condiitonal formatting on the data, so I need a custom DAX for this? 

 

Thanks for any assistance.

1 ACCEPTED SOLUTION
sdjensen
Solution Sage
Solution Sage

Hi @Anonymous,

 

I don't understand the 'ChannelClean' value in the Trend Axis. It only makes sence to add some sort of time to this.

 

There is something different in the filters of your KPI visuals compared to your card visuals - the KPI visual doesn't return a value of your AVG. (Goal).

 

Kind Regards,

Søren

/sdjensen

View solution in original post

6 REPLIES 6
sdjensen
Solution Sage
Solution Sage

Hi @Anonymous,

 

I don't understand the 'ChannelClean' value in the Trend Axis. It only makes sence to add some sort of time to this.

 

There is something different in the filters of your KPI visuals compared to your card visuals - the KPI visual doesn't return a value of your AVG. (Goal).

 

Kind Regards,

Søren

/sdjensen
Anonymous
Not applicable

I found that the channel search wasn't matching across the two KPI's, hence the problem. Going to apply the filter before adding it to the visual so it won't apply to the other KPI value and return a zero anymore.

hi

 

where do you put the logic for the color depending on the value, i can't see how to create the color range for kpi

Eric_Zhang
Employee
Employee


@Anonymous wrote:

HI All,

 

I am using a KPI to color green, red, orange from two fields which use dynamically changing data ie. the value changes. But when the value change the KPI displays the wrong color.

 

Desired Logic;

IF (B-A)>0, THEN [Green]

IF(B-A) <0, THEN [Red]

IF(B-A)=0, THEN [Orange]

 

You can see in screen shot that B is larger than A but it is red.

Second screen shot shows the fields used for A.

 

pic1.PNG

 

 

 

 

 

 

 

 

 

pic2.PNG

 

 

 

 

 

 

 

 

These columns are in different data sets. So we are unable to do a merge join or condiitonal formatting on the data, so I need a custom DAX for this? 

 

Thanks for any assistance.


@Anonymous

I’m not getting the "A" and "B" in your screenshots, could you be more specific? The color coding for the KPI works fine in my test. Also, when considering "A" equals "B", the would show green instead of oranage as you expect. Check KPI neutral color.

hi

 

where do you write the logic for colour change based on value  in the KPI Visiual, there is only "color coding" drop down but it doesn't allow you to set ranges

Anonymous
Not applicable

Changing the KPI's to tables shows that the columns are returning nulls or zero and this ovbiously effects the KPI. Wether this is a bug with Power BI or the data not sure yet. Though its highly lightly to be the data with the issue.

 

You can see after a slicer selection that the fields are blank.

actual.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.