Discussion Board for collaboration related to QlikView App Development.
Good Day from Bangladesh!!!
Here, following is the data table from which we want to derive few outputs :
1. New Placement: Number of outlet who have not purchase specific product during April 2019.
2. Cumulative New Placement: By date - cumulative sum of new placement
3. Repeat Purchase : Number of outlet who have purchased specific Product 2 or more times
Could you please help me?
Thanks in advance
Something like this
I created a flag in the script like this
LOAD Date(Date#(Date, 'D-MMM-YYYY')) as Date,
LOAD * INLINE [
Date, Outlet Code, Product, Sales
1-Apr-19, 1413601, DP, 10
1-Apr-19, 1413601, DDP, 20
2-Apr-19, 1413602, DP, 5
2-Apr-19, 1413603, DP, 15
4-Apr-19, 1413601, DP, 10
4-Apr-19, 1413603, DP, 5
3-Apr-19, 1413604, DDP, 35
4-Apr-19, 1413604, DP, 15
4-Apr-19, 1413605, DP, 5
If(Product = Previous(Product), If([Outlet Code] = Previous([Outlet Code]), 1, 0), 0) as RepeatFlag
Order By Product, [Outlet Code], Date;
DROP Table Table;
and then it was all about using the RepeatFlag in the set analysis
View solution in original post
You Are Super!
Working like magic