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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Microsoft Employee
Microsoft 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
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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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