Skip to main content
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

1 Solution

Accepted Solutions
sunny_talwar

That is what it should do. If Now() is 2/20/2017 12:30 PM, then Now() + 2 = 2/22/2017 12:30 PM

View solution in original post

92 Replies
sunny_talwar

That is what it should do. If Now() is 2/20/2017 12:30 PM, then Now() + 2 = 2/22/2017 12:30 PM

Not applicable
Author

Thanks Sunny!! U always do come to my rescue.

Not applicable
Author

Hi Sunny,

    Can u please help take look at the expression, its meant to produce 2 output, but its only giving me one. what could be the problem ??

sunny_talwar

Let's see... Looks good to me.... What 2 outputs are you hoping to see?

If(Match(TICKET_STATUS, 'WORK IN PROGRESS', 'HOLD', 'ASSIGNED', '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')))))

Not applicable
Author

This is giving me an "error in Expression". I am expecting to see - "OUT_OF_SLA & IN_SLA".

sunny_talwar

My bad, forgot to add a parenthesis

If(Match(TICKET_STATUS, 'WORK IN PROGRESS', 'HOLD', 'ASSIGNED', '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')))))

What is RESOLVE_BEFORE field's format? Is it read as Date or Time by QlikView?

Not applicable
Author

how will I know if it is date or time on Qlik sense?? and just like before it is showing the IN_SLA part and the other part isn't clickable, means its only seeing one output.

Not applicable
Author

Hi Sunny,

     The dialog box they keep talking about in the article isn't on Qlik Sense?? and how I do use the Date#() in an expression like the above ??