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

Color the background of the expression according their value

Dear all,

I have a straight table

Dimension-Site_Name

Expression-Sum(Sales)

Now here the top 10 stores are appearing using Dimension Limit

I want to use the darkest green for the top store and then the color will be gradually lighter for the lesser value.I have tried to do that using colormix().But it didn't work out.Please help me out.

1 Solution

Accepted Solutions
stabben23
Partner - Master
Partner - Master

Mybe you should use aggr on you dimension

=argb(sum(Sales) /
  max(TOTAL aggr(sum(Sales), Site_Name))
  * 255,0,172,0)

View solution in original post

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Its not possible to dynamically assign the darker and lighter color.

But you can use the Background color option to give a static color for a given range (Which you will have to define)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
stabben23
Partner - Master
Partner - Master

Hi,

you can use argb where (a) will reflect Your value. Use this in Expression background

argb(Sum(Sales)
/
max(TOTAL (sum(Sales), * 255,0,172,0) )

stabben23
Partner - Master
Partner - Master

Mybe you should use aggr on you dimension

=argb(sum(Sales) /
  max(TOTAL aggr(sum(Sales), Site_Name))
  * 255,0,172,0)

tresesco
MVP
MVP

Try background color expression like:

argb(255-rank(Sum(Sales))*20, 50,100,40)

Capture.PNG

Note: You would have different dimension. And you might want to change the color RGB different.

effinty2112
Master
Master

Hi Debasmita,

try setting the colour to something like:

ARGB(55 +20*(11-Rank(Sum(Sales))  ,0,255,0)

Cheers

Andrew