Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Incremental Month Count From First Month

I have yet to be able to find a solution to this out there. I am trying to create a pivot table of incremental months starting at the first month. There is a record for each month the Example1 has existed... But, Example2 could start at a different month depending on when it was purchased. I want to, for each Example, have the initial month be 1, but continue to count each month that the Example exists. 

In my Example1, it has existed for 16 months... but Example2 may have existed for 34 months... I am trying to figure out in the script how to create a field and label each month EACH example has existed. This point behind this is to show how much revenue has been brought in each month, not by actual MM/DD/YYYY, but by total months it has existed.

Example.PNG

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

@MalcolmCICWF  Assuming that you have example & month field available in data you can try below

LOAD *

.......

AutoNumber(Month,Example) as Number

resident Table

order by Example, Month;

drop table Table;

View solution in original post

3 Replies
Highlighted
MVP
MVP

@MalcolmCICWF  Assuming that you have example & month field available in data you can try below

LOAD *

.......

AutoNumber(Month,Example) as Number

resident Table

order by Example, Month;

drop table Table;

View solution in original post

Highlighted
Creator III
Creator III

That simple huh? Never used that before, let me give it a shot and I'll report back

Highlighted
Creator III
Creator III

It indeed did work perfect for what I needed it for. thank you