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
Anonymous
Not applicable

Card Visual Conditional Formatting

Thanks to all who respond.

 

I need help creating this measure:  I have 3 cards showing totals for 2021, 2020, 2019. I would like to have the font color change to red or green based on the previous year total. So if year 2020 amount was greater than 2021 change to 'red', if less than change to 'green'.

 

Table name = 'Sheet1'

Field name = 'Amount'

Field name = 'YEAR'

 

Any ideas?

Thanks-BLD

 

1 ACCEPTED SOLUTION
KerKol
Power Participant
Power Participant

You'll need to use a different KPI Card visual. There are a few options in AppSource.

 

You could create your own card visual using Smart Narratives:

KerKol_0-1643060316335.png

And change the colour of the font using this trick:

Smart Narratives and Conditional Formatting in Power BI? Yes please! - Guy in a Cube





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
KerKol
Power Participant
Power Participant

You'll need to use a different KPI Card visual. There are a few options in AppSource.

 

You could create your own card visual using Smart Narratives:

KerKol_0-1643060316335.png

And change the colour of the font using this trick:

Smart Narratives and Conditional Formatting in Power BI? Yes please! - Guy in a Cube





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

Proud to be a Super User!




Anonymous
Not applicable

Thank you, great idea.

BLD

Anonymous
Not applicable

@Anonymous HI, 

 

We cant dynamically change the font colour using Card, instaed use table for each value and you need to create 3 different measures where you need to use switch statement dax1 > dax2 then "Hex code of Red" like that..

Regards,
John Basha Mattipati,
https://www.linkedin.com/in/john-basha-mattipati-06812980/


Helpful resources

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

June 2025 community update carousel

Fabric Community Update - June 2025

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