Skip to main content
Announcements
New: No-code data prep in Qlik Cloud Analytics™ TAKE A TOUR
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Basket analysis: how to sum total sales per transaction?

Attached is a simple data set with only 3 dimensions: Transaction, Category, and Sales. Each transaction can have multiple categories in it, and I want to perform a basket analysis looking at the average sales when a transaction includes a particular category. So for example, while the table pictured below shows that $12,931 in Category Z0 sales occurred across all 57,663 transactions that it was a part of, I want to show what the total sales were across all of those 57,663 transactions that had Z0 in them - including the sales of all of the other categories that were in those transactions as well. How could I best accomplish this?

SalesPerTransaction.JPG

Thanks,

Jeff

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Not for the faint at heart. See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Not for the faint at heart. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Wow, perfect! Going to take me a bit to digest how all of that code works but once I do this'll be great to learn from. Thanks Gysbert

Jeff