Oct
28
Counting Customers Who Bought Both A and B via Data Densification
There has been a calculation that is needed in market basket and correlation analysis. There is a KB article about the topic (by self-join) and I wrote a post about it before (by custom SQL).
Recently Ćukasz Majewski has provided an ingenious solution using data densification. I am totally stumped. I am going to applying it to the same superstore example that I used before, and as a result, to document the details.
The objective of the analysis is to count customers who bought in both A and B subcategories of products.
The main steps are:
1.Duplicate Sub-Category field: Sub-Category (Copy). Drag them into columns and rows respectively. We see 17 data marks in the view.
2.Create Index (=Index()) and drag it into Details shelf. Set it to compute using Table Across or Subcategory.
Recently Ćukasz Majewski has provided an ingenious solution using data densification. I am totally stumped. I am going to applying it to the same superstore example that I used before, and as a result, to document the details.
The objective of the analysis is to count customers who bought in both A and B subcategories of products.
The main steps are:
1.Duplicate Sub-Category field: Sub-Category (Copy). Drag them into columns and rows respectively. We see 17 data marks in the view.
2.Create Index (=Index()) and drag it into Details shelf. Set it to compute using Table Across or Subcategory.