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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.