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: 
Not applicable

Calculating Intervals

Hi, I have a list with 'Item Number' and 'Date Sale'.

ItemDate
Item 0313/08/2013
Item 0612/08/2013
Item 0511/08/2013
Item 0910/08/2013
Item 0115/07/2013
Item 0305/07/2013

First, I calculate the interval in days between any date write by the user and the 'Date Sale'. If the user write the date (dd/mm/yyyy) 10/10/2013, then:

ItemDateInterval (days)
Item 0313/08/201358
Item 0612/08/201359
Item 0511/08/201360
Item 0910/08/201361
Item 0115/07/201387
Item 0305/07/201397

But instead the interval number, I show a label:

'1-29 Days'

'30-59 Days'

'60-89 Days'

'>= 90 Days'

ItemDateInterval
Item 0313/08/201330-59 days
Item 0612/08/201330-59 days
Item 0511/08/201360-89 Days
Item 0910/08/201360-89 Days
Item 0115/07/201360-89 Days
Item 0305/07/2013>= 90 Days

And (this is the problem) I need to select which interval to show, by example only show the Items with interval '>= 90 days' or intervals '1-29 Days' and '60-89 Days'. Remember that the user can write any date.

Attached a sample file, thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like attached?

View solution in original post

3 Replies
swuehl
MVP
MVP

Maybe like attached?

Not applicable
Author

Yes sir !! Thank you very much.

preminqlik
Specialist II
Specialist II

hi javier florez....

using class function we can do this....am attaching soln as per your example ...PFA