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
Roinka
Helper I
Helper I

Color visualization of numbers at column level

Hi,

I have a matrix of 2 rows and several columns.

Each cell present a diff value. I would like to visualize the values with colors. The colors should diverge from red (bad) to blue (good).

However on Some columns a large no is good (blue) and on others a large no is bad (red).

I would like the colors to be at column level, that is if in this column a high number is good than a high number would be blue and if in this column high is bad than high would be in red.

Category, revenue, customers leaving

CategoryA, 4% (red), 5% (blue)

CategoryB, 60%(blue), 80% (red) 

Is this possible?

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Roinka ,

 

We can set the font color conditional formatting based on a measure as below.

Color =
VAR L =
    FILTER ( ALL ( 'table' ), 'table'[TYPE] = "LEVING" )
VAR R =
    FILTER ( ALL ( 'table' ), 'table'[TYPE] = "REVENUE" )
RETURN
    SWITCH (
        TRUE (),
        SUM ( 'table'[VALUE] ) = MAXX ( L, [VALUE] ), "#FF0000",
        SUM ( 'table'[VALUE] ) = MINX ( L, [VALUE] ), "#0000FF",
        SUM ( 'table'[VALUE] ) = MINX ( R, [VALUE] ), "#FF0000",
        SUM ( 'table'[VALUE] ) = MAXX ( R, [VALUE] ), "#0000FF",
        "#FFFFFF"
    )

1.png2.png3.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @Roinka ,

 

We can set the font color conditional formatting based on a measure as below.

Color =
VAR L =
    FILTER ( ALL ( 'table' ), 'table'[TYPE] = "LEVING" )
VAR R =
    FILTER ( ALL ( 'table' ), 'table'[TYPE] = "REVENUE" )
RETURN
    SWITCH (
        TRUE (),
        SUM ( 'table'[VALUE] ) = MAXX ( L, [VALUE] ), "#FF0000",
        SUM ( 'table'[VALUE] ) = MINX ( L, [VALUE] ), "#0000FF",
        SUM ( 'table'[VALUE] ) = MINX ( R, [VALUE] ), "#FF0000",
        SUM ( 'table'[VALUE] ) = MAXX ( R, [VALUE] ), "#0000FF",
        "#FFFFFF"
    )

1.png2.png3.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.