Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
davemontoya
Contributor II
Contributor II

IF code condition explanation

Hi everyone, I am a little confuse with this code, I know basic thing like IF(condition, true, else) and wildmatch to look some letters, please can someone give an explanation, I really apreciated.

if(PrimeraNoMonitoreo>SegundaNoMonitoreo,SegundaNoMonitoreo-[Submit Date]
,if([Submit Date]>PrimeraNoMonitoreo or [Submit Date]>SegundaNoMonitoreo,0
,if(isnull(PrimeraNoMonitoreo),SegundaNoMonitoreo-[Submit Date],PrimeraNoMonitoreo-[Submit Date]))) as T_TTN,

//Cambio

if(([Assigned Group]='NOC Monitoreo CORE' or [Assigned Group]='NOC Monitoreo TX' or [Assigned Group]='NOC Monitoreo')
and [Service Type]='Infrastructure Event','No Aplica'
,if(wildmatch(Submitter,'NAE*')>0 and isnull([PrimeraIntervencionHumana])=0,[PrimeraIntervencionHumana]-[Submit Date]
,if([Service Type]='Infrastructure Restoration' and (Submitter='AOR_USER' or Submitter='UserAppPdg'),PrimeraIntervencionHumana-[Submit Date]
// ,if(([Assigned Group]='NOC Monitoreo CORE' or [Assigned Group]='NOC Monitoreo TX')
// and [Service Type]='Infrastructure Restoration' and wildmatch(Submitter,'NAE*')>0, //[PrimeraIntervencionHumana]-[Submit Date]
,if(isnull(PrimeraNoMonitoreo) and (Submitter='AOR_USER' or Submitter='UserAppPdg'),PrimeraIntervencionHumana-[Submit Date]
,if(isnull(PrimeraNoMonitoreo)=0 and (Submitter='AOR_USER' or Submitter='UserAppPdg'),PrimeraNoMonitoreo-[Submit Date]
,'No Aplica'))))) as TTTN_new,

if(([Assigned Group]='NOC Monitoreo CORE' or [Assigned Group]='NOC Monitoreo TX')
and [Service Type]='Infrastructure Event' and IsNull(PrimeraIntervencionHumana)=0,'Sin hora de Notificacion'
,if(isnull(PrimeraNoMonitoreo)=0 and (Submitter='AOR_USER' or Submitter='UserAppPdg')
,PrimeraNoMonitoreo&'-'&[Submit Date]
,PrimeraIntervencionHumana&'-'&[Submit Date])) as TTTN_new_texto,

if(PrimeraNoMonitoreo>SegundaNoMonitoreo,'SegundaNoMonitoreo-[Submit Date]'
,if(isnull(PrimeraNoMonitoreo),'SegundaNoMonitoreo-[Submit Date]','PrimeraNoMonitoreo-[Submit Date]')) as T_TTN_formula,

1 Reply
dwforest
Specialist II
Specialist II

It's a nested if 

The else is another if, evaluates in order