92 Replies Latest reply: Mar 1, 2017 8:55 AM by victor onyebuchi

# 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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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?

• ###### Re: What NOW() function will output??

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.

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

Ya send it along

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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.

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

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;

• ###### Re: What NOW() function will output??

Hi Sunny,

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

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;

• ###### Re: What NOW() function will output??

Checking

• ###### Re: What NOW() function will output??

Try this:

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','IN_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;

Essentially replace RESOLVE_BEFORE with TimeStamp#(RESOLVE_BEFORE, 'MMMM DD, YYYY hh:mm:ssTT')

• ###### Re: What NOW() function will output??

Thanks Sunny, it works. I which to be as intelligent as u some day

• ###### Re: What NOW() function will output??

Hi Sunny,

The condition isn't not producing the result I expected, someone told me to use else if condition, but it seems Qlik Sense script doesn't recognise it. I used this;

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;

how on earth do I modify this ??

• ###### Re: What NOW() function will output??

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?

• ###### Re: What NOW() function will output??

in my first condition where it says "IF(TICKET_STATUS = 'WORK IN PROGRESS' OR TICKET_STATUS='HOLD' OR TICKET_STATUS='ASSIGNED' OR TICKET_STATUS='NEW'"

it completely ignores and selects TICKET_STATUS that are already RESOLVED and CLOSED.

• ###### Re: What NOW() function will output??

Can you create a table with these fields

1) TICKET_STATUS

2) TIER='GOLD'

3) RESOLVE_BEFORE

4) DECODE_PRIORITY

5) OPEN_SLA

and highlight those rows where OPEN_SLA is not correct?

• ###### Re: What NOW() function will output??

TICKET_STATUS   RESOLVE_BEFORE     DECODE_PRIORITY

closed

The fact that it brought out a closed TICKET_STATUS as OUT_OF_SLA output, all other fields wouldn't be correct, because it has ignored my first condition of TICKET_STATUS being either "WORK-IN-PROGRESS" OR "NEW".

I hope u understand??

• ###### Re: What NOW() function will output??

And I could share the app if u want ??

• ###### Re: What NOW() function will output??

Yes, can you share the app?

• ###### Re: What NOW() function will output??

Hi Sunny,

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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?

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

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

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)

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

Hi sunny,

Can you suggest any better way I could achieve what I am looking for ???

• ###### Re: What NOW() function will output??

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.

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;

• ###### Re: What NOW() function will output??

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

• ###### Re: What NOW() function will output??

There was an issue with your RESOLVE_BEFORE Date field. Try this:

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

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

IF(TIER='SILVER',

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

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

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

• ###### Re: What NOW() function will output??

Hi Sunny

we are almost there, it is now bringing out the output I want, but still the CLOSED/RESOLVED ticket_status is still selected, if we can make it not add closed and Resolved Ticket_status, then we are fine. thanks I know u have put in much effort into this.

• ###### Re: What NOW() function will output??

What do you mean here?

it is now bringing out the output I want, but still the CLOSED/RESOLVED ticket_status is still selected, if we can make it not add closed and Resolved Ticket_status

You don't want these to come in your dashboard?

• ###### Re: What NOW() function will output??

I want the CLOSED AND RESOLVED ticket_status to be greyed out(not clickable) meaning it is not part of the matrix.

• ###### Re: What NOW() function will output??

I saw Open_SLA of null next to Closed ticket_status, isn't that what you want?

• ###### Re: What NOW() function will output??

Hi Sunny,

It is meant to be like that but on the actual qlik sense dashboard itself, it is selecting CLOSED ticket_status, I have to manually select WORK-IN-PROGRESS to get what I am looking for. If it was left to me alone, I would use it like this, but my whole team wouldn't understand.

• ###### Re: What NOW() function will output??

Select 'WORK-IN-PROGRESS' where? I am somehow not completely understanding the issue. Can we take a step back and can you walk me over the issue in detail as to what is that you don't want to happen? Try to provide as much details as possible

• ###### Re: What NOW() function will output??

ok. looking at the Dashboard above, you would see I selected the OPEN_SLA (OUT_SLA) option and as you can also see, the CLOSED,RESOLVED and WORK-IN-PROGRESS of the TICKET_STATUS filter pane can be selected also. what I want is, when any output in the OPEN_SLA pane is selected, the CLOSED and RESOLVED ticket_status should not be available to be clicked or let me put it this way, it should be greyed out, because I am only dealing with only WORK-IN-PROGRESS ticket here. If you look at the IF statement again, u would have a better understanding. I hope u understand this now.

• ###### Re: What NOW() function will output??

Yes I do.... let take a look at the if statement again

• ###### Re: What NOW() function will output??

Here you are

If(Match(TICKET_STATUS, 'WORK IN PROGRESS', 'HOLD', 'ASSIGNED', 'NEW'),

If(TIER = 'GOLD',

IF(Now() > TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT'),'OUT_OF_SLA','IN_SLA'),

IF(TIER = 'SILVER',

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

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

IF(DECODE_PRIORITY='Low' AND NOW()>(TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT') + 10),'OUT_OF_SLA','IN_SLA')))))) as OPEN_SLA

• ###### Re: What NOW() function will output??

woooow. you're a genius. There is no way on earth I would have done this alone. Thanks so much.

• ###### Re: What NOW() function will output??

Yes you would have.... you just had to piece meal it together with a pinch of patience....

• ###### Re: What NOW() function will output??

Hi Sunny,

Sorry to disturb you once again. But after getting past a hurdle, we would wanna do more, natural for human loool. so look at the conditional statement, is it possible a function can be added to the +days I added to the RESOLVE_BEFORE to automatically recognise the weekend days i.e sat and sunday and not include them??

• ###### Re: What NOW() function will output??

I am not sure I completely understand your question

• ###### Re: What NOW() function will output??

hi Sunny,

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

• ###### Re: What NOW() function will output??

Its working perfectly fine and I could continue with this, but I just want to see if it is possible for the code to recognise weekend days?? and if there isn't, its no problem.

• ###### Re: What NOW() function will output??

I am only striving for perfection lool

• ###### Re: What NOW() function will output??

oh sorry, it ddnt post it all.

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

I was saying the +7 in the above code which is technically represents +7days, is there anyway, we could add a function that the 7 days doesn't include weekend days just the 5 working days of the week??

• ###### Re: What NOW() function will output??

May be try with LastWorkDay. For example, if I use =LastWorkDate(Today(), 5), I get March 6th 2017. Is this sort of what you wanted? To get 5 working days forward from today?

• ###### Re: What NOW() function will output??

Yes, 5 working days from today. which part of the code should I change ??

• ###### Re: What NOW() function will output??

Like this

IF(DECODE_PRIORITY='Medium' and Now() > LastWorkDate(TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT'), 5)

• ###### Re: What NOW() function will output??

Hi Sunny,

The 7 you changed to 5 is actually 7 working days. Sure the changes would affect the expected result??

• ###### Re: What NOW() function will output??

How will it be incorporated into the code above ?

• ###### Re: What NOW() function will output??

Hahahaha it should... I am not 100% confident though.... But what do you loose by trying? 5-10 mins? I would give it a try to see if it works as your would expect or not

• ###### Re: What NOW() function will output??

I wouldn't know till it malfunctions lol. Unfortunately that's the sad part.

• ###### Re: What NOW() function will output??

With this though

IF(DECODE_PRIORITY='Medium' and Now() > LastWorkDate(TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT'), 7)

• ###### Re: What NOW() function will output??

Its giving me errors, where do I wrap the brackets ?? LastWorkDate(this bracket)

• ###### Re: What NOW() function will output??

And I want it applied to that +7 alone not the field RESOLVE_BEFORE.

• ###### Re: What NOW() function will output??

what do you mean? I am not sure I understand you want to apply this to +7 alone?

• ###### Re: What NOW() function will output??

Hi Sunny,

It doesn't really Matter, but hwhere do I wrap the LastWorkingDate() in the code below ??? I tried it and its giving me errors.

If(Match(TICKET_STATUS, 'WORK IN PROGRESS', 'HOLD', 'ASSIGNED', 'NEW'),

If(TIER = 'GOLD',

IF(Now() > TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT'),'OUT_OF_SLA','IN_SLA'),

IF(TIER = 'SILVER',

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

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

IF(DECODE_PRIORITY='Low' AND NOW()>(TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT') + 10),'OUT_OF_SLA','IN_SLA')))))) as OPEN_SLA

• ###### Re: What NOW() function will output??

from my understanding, may be this:

If(Match(TICKET_STATUS, 'WORK IN PROGRESS', 'HOLD', 'ASSIGNED', 'NEW'),

If(TIER = 'GOLD',

IF(Now() > TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT'),'OUT_OF_SLA','IN_SLA'),

IF(TIER = 'SILVER',

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

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

IF(DECODE_PRIORITY='Low' AND NOW()>(TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT') + 10),'OUT_OF_SLA','IN_SLA')))))) as OPEN_SLA

• ###### Re: What NOW() function will output??

Hi Sunny,

This is a weird question, cause I shld have known by now, lets say I wanna test that line and see the output, how do I go about it ??

• ###### Re: What NOW() function will output??

Just that line? I don't think it would be possible. I think you will have to run the whole application and look for a row that match the criteria and see if the result is what you expect.

• ###### Re: What NOW() function will output??

it is working fine now, but isn't there anyway, I can see the exact day(In date) the LastweekDate() made the code to become??

• ###### Re: What NOW() function will output??

Oh ya, you can add another field in your script like this

LastWorkDate(TimeStamp#(SubField(RESOLVE_BEFORE, ' ', 1) & ' ' & Trim(Mid(RESOLVE_BEFORE, Len(SubField(RESOLVE_BEFORE, ' ', 1)) + 1)), 'MMMM DD, YYYY hh:mm:ssTT'), 7) as TestTestTest

Now create a table with two fields

RESOLVE_BEFORE

TestTestTest

and see there relationship

• ###### Re: What NOW() function will output??

hmmm Sunny,

I envy you really. You're so good, its working. Thank you.

• ###### Re: What NOW() function will output??

Its all trial and error my friend . I don't hesitate in trying. What do you have to loose here by trying, right?

• ###### Re: What NOW() function will output??

One last thing, for any additional thing, I would suggest you to create a new thread as it is not very helpful for other users when a thread becomes extremely long. Although all your questions were related to your initial question, but breaking it out might help in two ways

1) Your question will get greater exposure

2) Future visitors won't have a difficult time to understand the thread.

Best,

Sunny

• ###### Re: What NOW() function will output??

Thanks. I will do that.

• ###### Re: What NOW() function will output??

Super

• ###### Re: What NOW() function will output??

Hi Sunny,

Hope u having a good day, I know you advised me to refrain from having different topics in a thread, but in this case I feel I would not be able to explain myself to those not familiar with my app as you are.

Attached is my App. when I click on any option of the filter pan "REMEDY_SLA" and "TIER_INCIDENT_SLA"  pane together, it inflates the figures on their respective Line Graph, but the correct figures are when they are not clicked at the same time. Can you help me check and see where I am doing something wrong?? Thanks

• ###### Re: What NOW() function will output??

Will check once I reach work

• ###### Re: What NOW() function will output??

Thanks !!!

• ###### Re: What NOW() function will output??

Which tab and what object am I looking at?

• ###### Re: What NOW() function will output??

"REMEDY_SLA" and "TIER_INCIDENT_SLA" tabs and their respective line chart graphs. Thanks

• ###### Re: What NOW() function will output??

I am neither seeing REMEDY_SLA or TIER_INCIDENT_SLA tabs?

• ###### Re: What NOW() function will output??

oh Sorry. its on the SDS DASHBOARD(page 1) sheet.

• ###### Re: What NOW() function will output??

See if attached is what you wanted

• ###### Re: What NOW() function will output??

Yes. Thanks Ever so much.

Count({<REMEDY_SLA_MET>}[TICKET_ID_])/Count({<SLA, REMEDY_SLA_MET>}TICKET_ID_)

I wanna learn, what does that line do??

• ###### Re: What NOW() function will output??

Numerator ignores selection in REMEDY_SLA_MET and Denominator is ignoring selection in both SLA and REMEDY_SLA_MET

• ###### Re: What NOW() function will output??

Thanks ever so Much Sunny. u' amazing!!