cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Community Support
Community Support

Re: Color visualization of numbers at column level

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
Community Support
Community Support

Re: Color visualization of numbers at column level

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

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors