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!

Reply
Anonymous
Not applicable

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 @Anonymous 

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

Anonymous
Not applicable

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
Super User

@Anonymous 

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! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

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

@Anonymous 
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! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

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

 

Anyways thanks for helping out

aj1973
Community Champion
Community Champion

Hi @Anonymous 

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

Anonymous
Not applicable

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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