Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kushal_Chawda

Rolling 24 months with diffrent logic

Dear All,

I have requirement where I need to show previous 24 months data based on current month selection.

For eg. If I selected Year '2013' & Month 'Dec' it should display data from Dec- 2011 to Nov-2013.

I can achieve this using set analysis , but due to some requirement I need to do it from Script.

So In script I need to have data  from Dec- 2011 to Nov-2013 for Dec-2013.

and from Nov- 2011 to Oct-2013 for Nov-2013

.

.

.

Any help will be appreciated to achieve this from Script.

Regrads,

Kush

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Kushal,

Please find attached files.

View solution in original post

7 Replies
Anonymous
Not applicable

Hi Kushal,

Please find attached files,it may help you.

Kushal_Chawda
Author

Jatin,

logic works but in my actual scenario there is IDS for Particular month..

for eg.

ID MONTH AMOUNT

1   Dec-13   100

2   Dec-13    200

3   Dec-13    300

4   Jan-14     150

5   Jan-14     200

6   Jan-14     400

.

.

.

.

tresesco
MVP
MVP

You might have to slightly modify the code that Jatin Kolhe has suggested depending on your data. If you can't get around, please prepare your sample app and share.

Anonymous
Not applicable

Hi Kushal,

Please find attach files.

Anonymous
Not applicable

Hi Kushal,

Please find attach files.

Anonymous
Not applicable

Hi Kushal,

Please find attached files.

Not applicable

Kushai,

I created a doc : http://community.qlik.com/docs/DOC-4821

In fact, you create an Asof table that will change the cardinality between the selection and the data: to compute 24 months.

The doc contain some scripts (I was a newbie when I wrote it but it can help you)

Fabrice