Hi all,
Currently we have a style variable with variable defined as
case when [data1] = 'R' then 'Red'
when [data1] = 'G' then 'Green'
when [data1] = 'W' then 'White'
end
Now the requirement is if data1 is null/white then, it should be conditionally formatted according to data2 values. Can you all suggest what i should do?
eg
Car Bike No
Red White 1
Green White 2
White Red 3
So when bike is white/null, the cell in list report should be formatted according to car values for that particular 'No' i.e Bike(red) for No 1
Quote from: KevinCOG on 05 Sep 2016 07:02:09 PM
Hi all,
Currently we have a style variable with variable defined as
case when [data1] = 'R' then 'Red'
when [data1] = 'G' then 'Green'
when [data1] = 'W' then 'White'
end
Now the requirement is if data1 is null/white then, it should be conditionally formatted according to data2 values. Can you all suggest what i should do?
eg
Car Bike No
Red White 1
Green White 2
White Red 3
So when bike is white/null, the cell in list report should be formatted according to car values for that particular 'No' i.e Bike(red) for No 1
You just have to modify your existing code a bit, as such:
CASE
WHEN [data1] = 'R'
THEN 'Red'
WHEN [data1] = 'G'
THEN 'Green'
WHEN [data1] = 'W' or [data1] IS NULL
THEN CASE
WHEN [data2] = 'R'
THEN 'Red'
WHEN [data2] = 'G'
THEN 'Green'
END
END