Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

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
Highlighted

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

Highlighted
Not applicable

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

Highlighted
Not applicable

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 ??

Highlighted

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')))))

Highlighted
Not applicable

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

Highlighted

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?

Highlighted
Not applicable

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.

Highlighted

Highlighted
Not applicable

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 ??