Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
who can help me look at this, my qlik sense script is highlighting it as wrong;
LOAD *,
IF(TICKET_STATUS = 'WORK IN PROGRESS' OR TICKET_STATUS='HOLD' OR TICKET_STATUS='ASSIGNED' OR TICKET_STATUS='NEW',
IF(TIER='GOLD' AND NOW() > TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT'),'OUT_OF_SLA',
else IF(TIER='SILVER',
IF(DECODE_PRIORITY ='High' AND NOW()>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT')+2),'OUT_OF_SLA',
else IF(DECODE_PRIORITY='Medium' AND NOW()>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT') +7),'OUT_OF_SLA',
else IF(DECODE_PRIORITY='Low' AND NOW()>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT') + 10),'OUT_OF_SLA','IN_SLA')))))) AS OPEN_SLA
I don't see anything wrong with this.
I think part of the issue was Resolve_Before field (you guys can look at the sample here)
stalwar1 pls help me look into this. Thanks
Yes, there is no ELSEIF in Qlik products... Would you be able to share few rows where the expected output doesn't match based on the fields from the above condition?
Hello Victor,
You can refer below given sample script:
LOAD *,
IF(
TICKET_STATUS = 'WORK IN PROGRESS' OR TICKET_STATUS='HOLD' OR TICKET_STATUS='ASSIGNED' OR TICKET_STATUS='NEW',
IF(TIER='GOLD' AND NOW() > TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT'),
'OUT_OF_SLA',
IF(TIER='SILVER',
IF(DECODE_PRIORITY ='High' AND NOW()>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT')+2),
'OUT_OF_SLA',
IF(DECODE_PRIORITY='Medium' AND NOW()>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT') +7),
'OUT_OF_SLA',
IF(DECODE_PRIORITY='Low' AND NOW()>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT') + 10),
'OUT_OF_SLA','IN_SLA')))))) AS OPEN_SLA
Hope this will be helpful.
Regards!
Rahul
You may have to write each If else separately and concatenate all them together
I think part of the issue was Resolve_Before field (you guys can look at the sample here)
Hi Raul,
Still same 'le problem.
Hello Victor,
Sincere apologies for caused inconvenience.
Could you please share the application with sample data? This will help us to understand the problem and provide required feedback.
Regards!
Rahul
Hi Raul,
please follow the link SUNNY TAWAL posted below, I shared it on there. for confidential reasons I wouldn't wanna share it allover. Please follow the link. Cheers
Close this thread by marking 'Assumed Answer' since the other thread has already resolved you issue.
Thanks,
Sunny