Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
utmccn,
utmcct,
utmcmd,
utmcsr,
utmctr,
utmgclid,
if(utmccn='(direct)','Direct',
if(wildmatch(utmcmd,'EMAIL'),'Email',
if(wildmatch(utmcsr,'WM'),'WM',
if(wildmatch(utmcmd,'pwa','BPN','APN','Chat','Bot','SMS','Chatbot') OR wildmatch(utmcsr,'MA','Bpush','WM','BPNMA','invitereferrals','TCblog') , 'MA',
if(wildmatch(utmcmd,'organic'), 'Organic',
if(wildmatch(utmcmd,'cpc','cpl','cpm','cpv','cpd','cpvl') OR wildmatch(utmcsr,'*Optimidea*','*google*','*Google*','*facebook*') OR wildmatch([Campaign Name],'DOM SEM - Jan ''24','INT SEM - Jan ''24'), 'Paid',
if(wildmatch(utmcmd,'referral','qrcode'),'Referral',))))))) as PROD_TYPE,
so i create one column PROD_TYPE in this i have field
'Direct'
'Email'
'WM'
'MA'
'Organic'
'Paid'
'Referral'
but my requirement is want to create one more field Non_Paid
Direct + Email + MA + Organic + Referral is 'Non_Paid'
Non Paid + Paid is 'Total'
from column "Lead Source" = 'Cross Sell' where the "Product Type" = 'Forex' is 'Cross sell'
one empty field is 'Personalisation'
so i want my PROD_TYPE column field look like this
'Direct'
'Email'
'WM'
'MA'
'Organic'
'Paid'
'Referral'
'Non_Paid' (Direct + Email + MA + Organic + Referral)
'Total' (Non Paid + Paid)
'Cross sell' (column "Lead Source" = 'Cross Sell' where the "Product Type" = 'Forex')
'Personalisation' (Blank)
You can write in preceeding or resident load
IF(Match(PROD_TYPE, 'Direct', 'Email', 'MA', 'Organic', 'Referral'), 'Non_Paid',
IF(Match(PROD_TYPE, 'Non Paid', 'Paid'), 'Total',
IF(Lead Source = 'Cross Sell' and Product Type = 'Forex', 'Cross sell',
IF(LEN(TRIM(PROD_TYPE))=0, Personalisation, PROD_TYPE)))) as New_Field