Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data set that is customer by transaction:
Name | Product | Product Type |
Tom Smith | Pizza | Pepperoni |
Tom Smith | Sub | Ham |
Tom Smith | Burger | Cheese |
John Doe | Pizza | Sausage |
John Doe | Sub | Turkey |
John Doe | Burger | Bacon |
Jane Rogers | Pizza | Garlic |
Jane Rogers | Sub | Portabello |
Jane Rogers | Burger | Double |
Bill White | Pizza | Pepperoni |
Bill White | Sub | Turkey |
Bill White | Burger | Cheese |
I need to create a report that captures the product interaction at a customer level. So, if i want to know interactions for pizza and sub:
Pizza | Sub | # Customers |
Pepperoni | Ham | 2 |
Sausage | Turkey | 1 |
Garlic | Portabello | 1 |
Any suggestions on application design or query structures?
Thanks
dimensions
aggr(Only({$ <Product={Pizza}>} [Product Type]), Name)
aggr(Only({$ <Product={Sub}>} [Product Type]), Name)
expression
count({$ <Product={Pizza,Sub}>} DISTINCT Name)
dimensions
aggr(Only({$ <Product={Pizza}>} [Product Type]), Name)
aggr(Only({$ <Product={Sub}>} [Product Type]), Name)
expression
count({$ <Product={Pizza,Sub}>} DISTINCT Name)