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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What NOW() function will output??

stalwar1s@@@@@who knows what the now function used below in my expression will produce??

IF(TICKET_STATUS = 'WORK IN PROGRESS' OR TICKET_STATUS='HOLD' OR TICKET_STATUS='ASSIGNED' OR TICKET_STATUS='NEW',

IF(TIER='GOLD' AND NOW()>RESOLVE_BEFORE,'OUT_OF_SLA','IN_SLA'),

IF(TIER='SILVER',

IF(DECODE_PRIORITY ='High' AND (NOW()+2)>RESOLVE_BEFORE,'OUT_OF_SLA',

IF(DECODE_PRIORITY='Medium' AND (NOW()+7)>RESOLVE_BEFORE,'OUT_OF_SLA',

IF(DECODE_PRIORITY='Low' AND (NOW()+10)>RESOLVE_BEFORE,'OUT_OF_SLA','IN_SLA')))))

I want the number(2) in  (NOW()+2) to be in DAYs and not HOURS??

e.g NOW()+2DAYS

92 Replies
Not applicable
Author

Hi Sunny,

    please find the attached.

Not applicable
Author

Hi Sunny,

    please find the attached.

sunny_talwar

I have attached an Excel, can you point out which OPEN_SLA is not the way you would expect?

Not applicable
Author

Hi Sunny, please find the attached. I have indicated where it is all wrong on there.

sunny_talwar

Have you reloaded the app in last few days or not? If you have not, can you try reloading it now? and see if the flag change?

Not applicable
Author

what do u mean flag and I refreshed it this morning like 2 hrs ago.

sunny_talwar

Sorry, I meant OPEN_SLA (instead of Flag). Can you see if this makes any difference

LOAD *,

    IF(TICKET_STATUS = 'WORK IN PROGRESS' OR TICKET_STATUS='HOLD' OR TICKET_STATUS='ASSIGNED' OR TICKET_STATUS='NEW',

IF(TIER='GOLD' AND NOW(1) > TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT'),'OUT_OF_SLA','IN_SLA'),

IF(TIER='SILVER',

IF(DECODE_PRIORITY ='High' AND NOW(1)>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT')+2),'OUT_OF_SLA',

IF(DECODE_PRIORITY='Medium' AND NOW(1)>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT') +7),'OUT_OF_SLA',

IF(DECODE_PRIORITY='Low' AND NOW(1)>(TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT') + 10),'OUT_OF_SLA','IN_SLA'))))) AS OPEN_SLA;

Added 1 to Now() function -> Now(1)

Not applicable
Author

Really don't know why its not working like its suppose to. this time it only has CLOSED ticket_status that shouldn't be there in the first place

svinnakota
Creator
Creator

Hi Victor,

    Can you please look at the strike part. I hope the if else condition is getting exited there itself.  If Tier ='Gold' and AND NOW()>RESOLVE_BEFORE  then  'OUT_OF_SLA'  else 'IN_SLA' end. The statement ends there is not going to the remaining conditions. Can you please cross check that if statement once again.

LOAD *,

    IF(TICKET_STATUS = 'WORK IN PROGRESS' OR TICKET_STATUS='HOLD' OR TICKET_STATUS='ASSIGNED' OR TICKET_STATUS='NEW',

IF(TIER='GOLD' AND NOW()>RESOLVE_BEFORE,'OUT_OF_SLA','IN_SLA'),

IF(TIER='SILVER',

IF(DECODE_PRIORITY ='High' AND NOW()>(RESOLVE_BEFORE+2),'OUT_OF_SLA',

IF(DECODE_PRIORITY='Medium' AND NOW()>(RESOLVE_BEFORE +7),'OUT_OF_SLA',

IF(DECODE_PRIORITY='Low' AND NOW()>(RESOLVE_BEFORE + 10),'OUT_OF_SLA','IN_SLA'))))) AS OPEN_SLA;

Not applicable
Author

You are right, but what can I do to amend it ???