I need to be able to discover certain combinations. For example, those who purchased Product A in one order and then Product B on another day. The actual scenario is:
[date] [passengerID] [bookingID] [airlineID]
So how many passengers travelled with Airline B and C or other combination I wish to discover. There is only one airline per bookingID, but a customer can have multiple bookingIDs
Here are two posts I wrote that may give you hints on solving your problem.
See if they help.
1 of 1 people found this helpful
You could filter to get all the customers who bought both.
Create a CONDITION filter on [Customer] that looks like this:
SUM(IF [product] = [Product Parameter 1] THEN 1 ELSE 0 END) > 0
SUM(IF [product] = [Product Parameter 2] THEN 1 ELSE 0 END) > 0
Make two parameters. Let the user specify the values.
If you just need a cross table of products and count of distinct customers then you may use this simple solution:
index is addressed so that it densifies marks for each product combination (with a purchase)
count is computed along customer and it yields the value you need
A&B.twbx 15.5 KB
This is an amazing solution. I used to do it using custom sql. I like the way you did using data densification.
I wrote a note to document the details.