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

How to gradient Cell background in straight table?

How to get the gradient shade from green to red on the cell background?

 

  • Dimension is Product Name
  • Measure is the percentage of order completed.
  • My measure expression is  Sum([Completed]) /sum( [Scheduled])

 

If higher the number the redder it should get. below is the RGB color that I have used in other charts, so I would love a gradient background on that table

  • RED = RGB( 210,34,45) 
  • GREEN = RGB(35,136,35)

 

Thank You

 

Labels (2)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, maybe something like this?:

colormix1(Sum([Completed])/Sum([Scheduled]), RGB(210,34,45), RGB(35,136,35))

View solution in original post

2 Replies
justISO
Specialist
Specialist

Hi, maybe something like this?:

colormix1(Sum([Completed])/Sum([Scheduled]), RGB(210,34,45), RGB(35,136,35))

vinieme12
Champion III
Champion III

You can also manually calculate the gradient RGB based on the rank

Try below

 

RGB(

//R
35 +
(
((210-35)/(Count(distinct total Product)-1) ) * (rank(Sum([Completed]) /sum( [Scheduled]))-1)
)
,

//G
136 -
(
((136-34)/(Count(distinct total Product)-1) ) * (rank(Sum([Completed]) /sum( [Scheduled]))-1)
)
,

//B
35 +
(
((45-35)/(Count(distinct total Product)-1) ) * (rank(Sum([Completed]) /sum( [Scheduled]))-1)
)
)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.