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
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...

@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

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

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.