Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
tyagishaila
Specialist
Specialist

Set analysis Date Range

Dear Community members,


I have these two fields

Created DateClose Date
1-Oct-161-Oct-16
2-Oct-162-Oct-16
3-Oct-16
4-Oct-16
5-Oct-167-Oct-16
6-Oct-16
7-Oct-167-Oct-16
8-Oct-16

And expected result is

TotalOpenClose
1-Oct-16101
2-Oct-16202
3-Oct-16312
4-Oct-16422
5-Oct-16532
6-Oct-16642
7-Oct-16734
8-Oct-16844
means for every date , date range start with 1-Oct-16.
Total:     suppose we check for 6-Oct-16 than total created date must be the total of 1st to 6th.
Open

38 Replies
tyagishaila
Specialist
Specialist
Author

Thanks a ton.

tyagishaila
Specialist
Specialist
Author

Hi Sunny,

I have further requirements.

Noe I need to show all open cases in bucket.

Open cases for 1 to 3 days

Open cases for 4 to 7 days

Open cases for 8 to 16 days

Open cases for 16 to 30 days

Open cases for more than 30 days.

For example:  for month Aug

Open cases for 1 to 3 days means cases open before 3 days.

i.e. open cases between date 29-aug-16 to 31-aug-16.



Thanks


sunny_talwar

tyagishaila‌ -

I think its better you open a new thread for a new set of requirement as it would be difficult for others in the future to track down what this thread was all about. In addition, you will get more set of eyes by creating a new thread.

Best,

Sunny

tyagishaila
Specialist
Specialist
Author

Okay

tyagishaila
Specialist
Specialist
Author

Actually I am not able to make it a new thread,

Sorry I have no idea of it.

Please help me out to make a bucket of time period

to know that how many open cases are open in 1 to 3 days , in 4 to 7 days.... so on for each month.

Thanks

Anil_Babu_Samineni

Usually, We can create buckets like this. Sunny, This is just guess correct me if i am wrong

Use this as a calculated dimension

If([Open case] >=Day([Open case],'1') <= Day([Open case],'3'), Dual('1 to 3 days',1),

If([Open case] >=Day([Open case],'4') <= Day([Open case],'7'), Dual('4 to 7 days',2),

If([Open case] >=Day([Open case],'8') <= Day([Open case],'16'), Dual('8 to 16 days',3),

If([Open case] >=Day([Open case],'17') < Day([Open case],'30'), Dual('17 to 30 days',4),

If([Open case] >=Day([Open case],'30'), Dual('More than 30 days',5))))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

This is right Anil, but we need to use an expression instead of Open Cases because Open cases is a calculation here and not a field from the script. We will need to use Aggr() function to get the results.

sunny_talwar

Anil -

I take my response back, you might be right after all. I am testing and will let you know soon.

Best,

Sunny

sunny_talwar

From the sample provided, what is your expected result?

tyagishaila
Specialist
Specialist
Author

@Sunny

Happy Dussehra!

Suppose we are checking for 8-oct

Created DateClose DateOPen for 8-oct
1-oct-161-oct-16
2-oct-162-oct-16
3-oct-161
4-oct-161
5-oct-167-oct-16
6-oct-161
7-oct-167-oct-16
8-oct-161

  

Output must be

open for 1 to 2 days
open for 3 to 6 days
open for more than 7dys
8-0ct to 6-oct
5-oct to 2-oct
before 1-oct
Total
              2                 2            0         4

In above output table 2nd row is not a part of output , it is just to understand range of date for which open cases are calculating.

Thanks