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
PZU_DGW
Regular Visitor

Conditional fill shape color

Is it possible to conditional fill de color of a shape depending on the value of a measure? I'd like to have a green fill of a square when the measure is not blank and a red fill when it is blank. Despite my own efforts and internet search I'm still not capable. So I can use some help 😉

 

Thanks in advance!

 

PZU 

1 ACCEPTED SOLUTION

@PZU_DGW 

IF you are using different measures, then you need to apply them individually. 

There is a way to automate by using Calculation Group in Tabular Editor

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

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@PZU_DGW 

Make sure you have the latest Power BI desktop version installed. Create a measure like the one below. 

CF Measure = IF( ISBLANK([Yourmeasure]) , "Red" , "Green" ) 

 Under Fill, choose the fx and apply the measure under filed value.

Fowmy_0-1634465052450.png

 

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

Dear Fowmy,

 

Thanks for your reply and it works..but there's a catch. Unfortunatly is do have 9 buttons in my report (please dont't ask me why). Is there a way I do not have to make 9 separate measures to check the value? I already guest that I will make 2 color-measures (for with and without value) so i can change the colorstyle easily.

 

Thanks so far!

@PZU_DGW 

IF you are using different measures, then you need to apply them individually. 

There is a way to automate by using Calculation Group in Tabular Editor

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

I've read about Calculation Groups, but for now I will make 9 separate measures. Thanks for the help (again!). I will take the time to figure out calculation groups later.

 

Greetings,

 

PZU

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.

Top Solution Authors