Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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,

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

sunny_talwar

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

Not applicable
Author

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.

sunny_talwar

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?

Not applicable
Author

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

sunny_talwar

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

Not applicable
Author

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.

sunny_talwar

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

Not applicable
Author

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.

sunny_talwar

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