Are if statements possible to switch the content of a string?
Lets say ServiceType = "EL" meaning that it is an Electrical Service Type. Is it possible to tell cognos to display in the report "Electrical" if ServiceType is equal to "EL" and "Water" if ServiceType is equal to "WTR"?
Thank you in advance
IF and CASE statements both work fine in Cognos
if([ServiceType] = 'EL') then ('Electrical') else (if([ServiceType] = 'WTR') then ('Water') else ('Undefined'))
case ServiceType
when 'EL' then 'Electrical'
when 'WTR' then 'Water'
else 'Undefined'
End