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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
gree1502
Helper II
Helper II

change the color of the data value of "card component" dynamically based on a condition

Hi,

 

Is it possible to change the color of the data value in "card component" based on some condition.

Eg: if the count is 0, color is black. If > 0, color is red?

 

Thanks in advance!

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Try the Card with States Custom Visual

 

Card with States - TEXT.png

 

Problem A Measure =
IF (
    HASONEVALUE ( 'Table'[Project] ),
    CONCATENATEX ( 'Table', 'Table'[Problem A], ",", 'Table'[Problem A], ASC ),
    "Select a Project"
)

 

Card with States - TEXT2.png

 

Good Luck! Smiley Happy

 

View solution in original post

5 REPLIES 5
Sean
Community Champion
Community Champion

Try the Card with States Custom Visual

 

Card with States - TEXT.png

 

Problem A Measure =
IF (
    HASONEVALUE ( 'Table'[Project] ),
    CONCATENATEX ( 'Table', 'Table'[Problem A], ",", 'Table'[Problem A], ASC ),
    "Select a Project"
)

 

Card with States - TEXT2.png

 

Good Luck! Smiley Happy

 

Anonymous
Not applicable

Hi Team, 

 

What if I need to change the colour of the value displayed on the card with respect to other column value?

Eg: Actual Value should be"Red" if the value is > Target value2, "Green" if Actual value1 < Target value2 

 

 Capture.PNG

Thanks in advance

Anonymous
Not applicable

Hi,

below are the steps:

- Add "Advance card" from market place

- Use Conditions property to add conditions

Note: By default this property is disabled. If enabled, this property will be used to apply conditional formatting to visual.

 

Thanks,

Satya

Anonymous
Not applicable

pbi.png

I use the Card With States.

When the value is higher than 0, it should color red. This works, but as you can see, it doesn't fill the whole visual.

I want to fill the whole Visual.

I can remove the border, but If the number is zero then there is no border....

Any way to fix this? Thanks in advance!

 

malagari
Continued Contributor
Continued Contributor

I believe you could use the KPI visualization for this, and set your goal as your condition.

Dan Malagari
Consultant at Headspring

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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