Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
luckanpej
Contributor
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
Champion III
Champion III

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

MarcoWedel

Hi,

another solution might be:

QlikCommunity_Thread_271395_Pic1.JPG

QlikCommunity_Thread_271395_Pic2.JPG

hope this helps

regards

Marco