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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
NJCLIFFORD
Frequent Visitor

Conditionally change colour of CARD

Howdy,

 

I have needed to change the colour of the field value in a CARD, which I know cannot be done at the moment. I downloaded the vizualisation 'Advance Card' which enables this to be done. Had it working and published, on the browser works perfectly. As I change filters, it changes from red to green as expected.

 

Now, when I download the PBIX file, and I select the field in Power BI Desktop, the highlighted vizualisation is the Card. I have the Advance Card installed and can see it on the list, but the field when selected highlights the Card icon. Also, when I look at Visual / Callout Value for the card under Color it just has the dropdown option for colour, and is defaulted to red (as default filter sets it to red). When I change the filter in Desktop, the colour changes to green as expected. Change again, goes back to red. 

 

The minute I click on the color dropdown box, when I change the filter it now does not change.....

 

Can someone explain what I am doing wrong??  Is ADvance Card the only 'easy' way to change the colour of a value??

 

Thanks


Nick

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@NJCLIFFORD,

 

You can achieve this with the native Card visual by using the measure below (use color codes or names):

 

Color Format = 
VAR vAmount = [Amount]
VAR vResult =
    SWITCH (
        TRUE,
        vAmount > 0, "Green",
        vAmount = 0, "Yellow",
        vAmount < 0, "Red"
    )
RETURN
    vResult

 

In the Card formatting options, set conditional formatting:

 

DataInsights_0-1663787414575.png

 

DataInsights_1-1663787428521.png

Result:

 

DataInsights_2-1663787448446.png

---

DataInsights_3-1663787471626.png

---

DataInsights_4-1663787489366.png

 





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

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@NJCLIFFORD,

 

You can achieve this with the native Card visual by using the measure below (use color codes or names):

 

Color Format = 
VAR vAmount = [Amount]
VAR vResult =
    SWITCH (
        TRUE,
        vAmount > 0, "Green",
        vAmount = 0, "Yellow",
        vAmount < 0, "Red"
    )
RETURN
    vResult

 

In the Card formatting options, set conditional formatting:

 

DataInsights_0-1663787414575.png

 

DataInsights_1-1663787428521.png

Result:

 

DataInsights_2-1663787448446.png

---

DataInsights_3-1663787471626.png

---

DataInsights_4-1663787489366.png

 





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

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.