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
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
Responsive Resident
Responsive Resident

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