Forum Discussion
Anonymous
6 years agoNot applicable
Case statement to calculated column
Hi all, I have a scenario where I need to create a new column using case statement mentioned below, I tried using switch but it did not work any help would be highly appreciated. CASE WHEN...
az38
6 years agoCommunity Champion
Anonymous
I, m too lazy to re-write all of your statement but use this logic when you create a Column:
property = SWITCH(TRUE(),
[publication]= 101 || [publication]= 100, 'LAT'
[publication]= 151 || [publication]= 150,'SAN'
)
then
product_type =
SWITCH(TRUE(),
([isdigital] = 1 || [iseedition] = 1) && [isprint] = 0 , 'Digital Only',
([isdigital] = 1 || [iseedition] = 1) && [isprint] = 1. 'Bundle'.
'Print Only'
)
and
source_group = SWITCH([source_group],
'VO', 'VO - Voluntary Customer Service',
'SB', 'SB - Subscriber Button',
[start_source]
)Anonymous
6 years agoNot applicable
Thank you for the reply, you have stated the solution with three different columns i want them in a single column, if thats possible please let me know.