Hi,
I have a table want to apply threshold on con column t2 based on custom condition i.e.
if value of t2 > t3 then the t2 column value should be changed to red, which means the value 85 and 110 should be highlighted with red color.
if value of t2 < t4 then the t2 column value should be changed to orange, which means the value 25 should be highlighted with orange color
table snapshot attached for quick reference.
Is it possible to do so? Any help would be highly appreciated!
but this will require something like this in your datasource query (this is a sample)
with src
as
(
select 'test_14' as t1, 25 as t2, 80 as t3, 35 t4 union
select 'test_11' as t1, 85 as t2, 80 as t3, 40 t4
)
select *,
case when t2 > t3 then '#FF0000'
when t2 < t4 then '#FFA500'
end Color
from src
Thank you for your reply. I tried what you have shown, but only have 1 transform, and it didn’t work. It always used the last color in the dataset, for both records.
Yes what I am hoping to do, is set the color for each record, based on the result of the color column. The first record should be orange, and the second record should be red. But that is not happening.
So the other alternative would be building an HTML table using the another plugin?