cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sanath_95
Regular Visitor

KPI colour - Conditional Formatting

Hello,

 

I have built a few KPI cards as follows ..

Sanath_95_0-1624288679378.png

Sanath_95_1-1624288706117.png

So.. It has a value coming out of a Measure (Can be percentage or value in Millions) and Goals coming out of a table containing all the targets based on months.

 

Now I want to change the colour of the Value coming from the Measure based on the Goals.

I want it to turn green even when it approaches the goal ..

say if the Goal is 50% and my value is 41% ..it should be green

if its 31% its orange and below 30% its red.

 

How can I achieve this?

 

May be this is simple.. but I am new to PBI and would love your responses.. 

 

 

2 ACCEPTED SOLUTIONS
aj1973
Community Champion
Community Champion

Hi @Sanath_95 

You can Either select the Card and go to 

aj1973_0-1624290397849.png

Or create a DAX measure for the purpose

 

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

Hello,

 

Thanks..

But How can I use this to set up the rules for all three colours?

Sanath_95_0-1624356921639.png

I tried to set up the same rules for all the three (good, neutral and bad colour)..

Isnt this the same as acking it up with DAX?

 

Thanks

View solution in original post

6 REPLIES 6
Fowmy
Super User IV
Super User IV

@Sanath_95 

Create a measure that gives you the color based on the conditions as follows:

CF Goal = 
SWITCH(
    TRUE(),
    [Actual] >= .41 , "Green",
    [Actual] >= .31 , "Orange",
    "Red"
)


Select your KPI Visual then click each fx under Color Coding

Fowmy_0-1624290508041.png

Click on the  Format By and choose Field Value and under Based on, select your the Measure CF Goal

Fowmy_1-1624290532683.png

Repeat for all three colors.

 

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Website   YouTube    LinkedIn   Join my Power BI User

Hello,

 

Thanks..

But How can I use this to set up the rules for all three colours?

Sanath_95_0-1624356921639.png

I tried to set up the same rules for all the three (good, neutral and bad colour)..

Isnt this the same as acking it up with DAX?

 

Thanks

View solution in original post

@Sanath_95 
The conditions are set up in the measure CF Goal. You need to select Format by field value and select the CF goal for BAsed on Field. Refer to my 3rd screenshot

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Website   YouTube    LinkedIn   Join my Power BI User

Yes.. but my question was different ..:)

 

Anyways thanks for helping out

aj1973
Community Champion
Community Champion

Hi @Sanath_95 

You can Either select the Card and go to 

aj1973_0-1624290397849.png

Or create a DAX measure for the purpose

 

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

Hello..

 

I saw this option is available individually for Good colour, neutral colour and bad colour...

How can I set this up for KPI card?

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors