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
Delion
Helper IV
Helper IV

How to apply conditional formatting TEXT only in card ?

Delion_0-1613456817230.png

 

Hi

how to apply conditional formatting TEXT only  in card ?

 

Thank

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Delion ,

 

Try this:

Measure = IF(SUM('Table'[Column2])>=3,"Red","Black")

card.gif

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

View solution in original post

8 REPLIES 8
Icey
Community Support
Community Support

Hi @Delion ,

 

Try this:

Measure = IF(SUM('Table'[Column2])>=3,"Red","Black")

card.gif

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

Thank @Icey 

I have further question

How to make this color coding dynamic ?

Example :

Jan sales < 10% color Red

Feb sales < 20% color Red

March sales < 30% color Red

 

Icey
Community Support
Community Support

Hi @Delion ,

 

How are your card visualizations created? One month sales for one card?

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Icey 

no

1 card for all month sales

Icey
Community Support
Community Support

Hi @Delion ,

 

How about something like this:

Measure =
VAR All_ =
    CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table'[Month] ) )
VAR Jan_ =
    CALCULATE ( SUM ( 'Table'[Sales] ), 'Table'[Month] = 1 )
VAR Feb_ =
    CALCULATE ( SUM ( 'Table'[Sales] ), 'Table'[Month] = 2 )
VAR Mar_ =
    CALCULATE ( SUM ( 'Table'[Sales] ), 'Table'[Month] = 3 )
RETURN
    IF (
        Jan_ / All_ < 0.1
            || Feb_ / All_ < 0.2
            || Mar_ / All_ < 0.3,
        "Red",
        "Black"
    )

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Delion
Helper IV
Helper IV

@amitchandak 

I mean the number will change the color base on threshold

Delion_0-1613457838559.png

 

@Delion , Create a color measure and use that in conditional formatting using field value option

color = if([meausre] <[threshold] ,"red", "green")

 

 

Refer to the link I have given last update for steps. Or part of this video have that -https://www.youtube.com/watch?v=veCtfP8IhbI

amitchandak
Super User
Super User

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.