Discussion Board for collaboration on QlikView Scripting.
I am trying to create period for the last order date of customers.
Customers may have mulitple pruchases or may not have purchased anything in the periods noted below. Only the last order date per customer is relevant.
The periods are spanning two years:
I need to use the values of those periods in a calculation.
First of all how do I get the last order date per customer and how do I then link that to the periods above?
Thanks for your help,
Go to Solution.
hei try to install a script a long this lines
for last order date by customer in the script use:
load max(OrderDate) as LastOrderDate,
year(max(OrderDate) ) as LastOrderYear,
group by CustomerID;
intervalmatch (LastOrderYear) load StartYear EndYear resident Periods;
Thanks for your help. That works like a treat!