Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column naming "sales" with values ranging from 1 to 10000
I need to make the background colour of the cell from a lighter shade of red to a darker one depending on the value of cell but i am not able to find colour by measure option for data in table.Please help
Hi @ankuragrawal, I suggest to use the ARGB function, using the first parameter to make the color more or less transparent:
ARGB(Sum(sales) * 255 / 10000, 255, 0, 0)
JG
You can use the RGB function with Sales. You may need to adjust if you are aggregating the Sales figure.
=RGB(255-(100*(Sales/max(Total Sales))),
230-(240*(Sales/max(Total Sales))),
230-(240*(Sales/max(Total Sales))))
its working,but however i have some negative values also and its not working for them
Then you should have to shift the interval. For example, if you have values between -10,000 and +10,000, adding 10,000 to your value and dividing by the new width of 20,000:
ARGB((Sum(sales) + 10000) * 255 / 20000, 255, 0, 0)
JG