Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnu123
Creator
Creator

Requirement on Grouping of Days and finding ticket age

Hi Team,

Here is My requirement..

For Example :

I have one incident  'A' I need to calculate the age of that incident using Today date

For every ticket  we are also having resolved date By using today date and resolve date we should find a Ticket age

If for 'A' ticket the resolved date Aug 6th then it should show <5days

If resolve date is 11th aug then it should show<10

if resolve date is aug 2nd i.e yesterday then it should show Past.

Everything should be calculated by using current date and resolved date

Hope I was clear

Thanks

Chinnu.

1 Solution

Accepted Solutions
chinnu123
Creator
Creator
Author

Thanks sunny its works fine But I struck at another similar scenario can you please help on this too

i.e if todaydate -submitdate<1 it should show <1 Days

    if todaydate -submitdate>=1 and <=2 it must show 1-2 days

    if todaydate -submitdate>=8 and <=3o it must show 8-30 days


I tried by using above scenario but I am not getting exact values can you please help on this


Thanks,

Chinnu.

View solution in original post

4 Replies
sunny_talwar

May be like this:

If([Resolved Date] - Today() < 0, Dual('Past', 1),

If([Resolved Date] - Today() < 5, Dual('<5 days', 2),

If([Resolved Date] - Today() < 10, Dual('<10 days', 3), Dual('>= 10 days', 4)))) as Flags


chinnu123
Creator
Creator
Author

Thanks sunny its works fine But I struck at another similar scenario can you please help on this too

i.e if todaydate -submitdate<1 it should show <1 Days

    if todaydate -submitdate>=1 and <=2 it must show 1-2 days

    if todaydate -submitdate>=8 and <=3o it must show 8-30 days


I tried by using above scenario but I am not getting exact values can you please help on this


Thanks,

Chinnu.

sunny_talwar

May be this:

If(Today() - submitdate < 1, Dual('<1 day', 1),

If(Today() - submitdate <= 2, Dual('1-2 days', 2),

If(Today() - submitdate <= 7, Dual('3-7 days', 3),

If(Today() - submitdate <= 30, Dual('8-30 days', 4))))) as Flag

Not sure if you need the portion on the red, but can be easily removed and the last row would just have 3 under the Dual function

chinnu123
Creator
Creator
Author

Thanks Its Working Sunny