Discussion Board for collaboration related to Creating Analytics for QlikView.
I need to count how many transactions have been made for each of the product from the every solddate + 7 days. This is my table:
I wish to achieve the following result:
For example, for product 1001, count for 01-Jul-13 is 4 because there are 4 transactions before 08-Jul-13 where solddate>=solddate but <=solddate+7.
Count for 04-Jul-13 is 2 because there are 2 transactions before 11-Jul-13.
It would be great if anyone can help me on this. Thanks in advance.
Go to Solution.
See attached example. I don't see a way to get two records for 3/7/2013 for product 1001 with different counts. Other than that it's what you want afaict.
anyone can help me on this?
Thanks Gysbert this is exactly what i want!!!
Could you explain to me the script? how does this "IterNo" function works?
And why i need to count(Amount)? instead of count(Product)?
The iterno() is used to get the iteration number of the while loop. Your example didn't have a field named CIF. If you rather use another field then Amount to count that should work too as long as it isn't Product or SoldDate.
my mistake... what i mean is why we can't use Product? Count(Product)?