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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sujitjena
Resolver I
Resolver I

Conditional Formatting based on calculated measures

Hi - I want to add shapes/cards such that it changes color based of the value of another measure. 

In the below example (attached pic) the card is a in the shape of small circle. All i want is the color to change to red when its greater than the card above it or green when less. For this i have also created another Measure only for the small circle that is given below:

Variance Colour = IF([Growth %]>[LC %],"#FF6966","#297D6F"). However, this doesnt work. Any suggestions or alternatives?Color Coding Measures.PNG
 
I tried conditional formatting but it is dependant on manual input for minimum or maximum values and i want a dynamic set up. Not sure if there is a way.
1 ACCEPTED SOLUTION

Hi @sujitjena 

Add the [Conditional Format] measure to a "Advanced card" visual, then set the Format->Conditional option as below

Change the measure to below:

Conditional Format = IF([GP Deployed FYTD]<[GP Deployed LYYTD],1,0)

Capture16.JPGCapture17.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-juanli-msft
Community Support
Community Support

Hi @sujitjena 

To get the icon, create a measure and format the color of the icon.

Measure = UNICHAR(9679)

Capture18.JPG

icon list

http://xahlee.info/comp/unicode_geometric_shapes.html

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

If possible please share a sample pbix file after removing sensitive information.Thanks.

My Recent Blog -

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak : I have shared the PBIX file at below link. I am basically trying to change the color of the card based on the measure "Conditional Formatting". Not sure if this is possible.

 

https://www.dropbox.com/s/7hdvaak788gqm89/PBIX%20View.pbix?dl=0

Hope this is what you need. There is three vertical . in backgroud color, Only appear when take mouse there. The click and choose formatting.

Screenshot 2020-01-13 23.21.01.pngScreenshot 2020-01-13 23.21.15.pngScreenshot 2020-01-13 23.22.27.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak : I already tried this, but its a range that controls the change of color. I need more of a dynamic set up where the comparison value changes month on month.In my PBIX file the card i want to be colored is the 3rd one (Conditional Format) and not the (FYTD or LYYTD).

If you see the measure i created (Conditional Format) - I am trying to set it up based on the values in GP Deployed FYTD and GP Deployed LYYTD. Can we control the color coding this way?

Hi @sujitjena 

Add the [Conditional Format] measure to a "Advanced card" visual, then set the Format->Conditional option as below

Change the measure to below:

Conditional Format = IF([GP Deployed FYTD]<[GP Deployed LYYTD],1,0)

Capture16.JPGCapture17.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-juanli-msft : Thanks Maggie, I think this is what i was looking for. Advanced card worked.

@sujitjena, I used that measure in conditional formatting. Is there something else we are looking for.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.