Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
luckanpej
New Contributor

Counting number of first orders per week

Hi all,

I have a question about counting customers first orders per week.

In my app I only have one data source thas has a similar strucutre to this:

CustomerIDOrderIDWeek
1122334455520
9595959566620
1010101077721
1122334488821
9595959599922
1122334400022
1010101044422

What I want to accomplish is to count the first order per week, preferarably without modifying the Load Script.

For example.

CustomerID 11223344 has its first order on Week 20, so it should only be counted on that row in the table, not on week 21 and 22 even though it has placed orders there.

CustomerID 10101010 has its first order on Week 21, so it should only be counted there even though it also placed an order on Week 22


How can I accomplish this so I can could each customers first order/week?


Thankful for help!

2 Replies
vishsaggi
Esteemed Contributor III

Re: Counting number of first orders per week

Is this what you are looking for?

Capture.PNG

If yes, using Straight or Pivot table do below:

Dim: CustomerID, Week, OrderID

Expr: = Rank(Aggr(Count(OrderID), CustomerID))

Then in presentaion tab check

Supress zero values

Re: Counting number of first orders per week

Hi,

another solution might be:

QlikCommunity_Thread_271395_Pic1.JPG

QlikCommunity_Thread_271395_Pic2.JPG

hope this helps

regards

Marco