Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP 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

I could send you my file for you to see yourself.

sunny_talwar

Ya send it along

Not applicable
Author

Please find the attached. I don't know why this small piece is giving me problem. Thanks

sunny_talwar

I am not sure I understand the issue. SLA filter is working for me

Capture.PNG

Not applicable
Author

Nope not that one. if u open the SDS DASHBOARD-2 sheet, u would find a pie chart there, the dimension used is where I am having problem. it is called TIER OPEN SLA.

sunny_talwar

If statements are not a good option to use for calculated dimension when they involve more than one field. Selections become a problem. I would suggest taking this calculation to the script and creating a field which you can then use in your chart as a dimension

Not applicable
Author

Ok. lemme try and see if it works that way.

Not applicable
Author

Even after running the below code on the script, its still comes out with one output - IN_SLA, instead of two outputs.

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

Hi Sunny,

     Can you help me look at this IF statement pls, its giving me just one output.

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;

sunny_talwar

Checking