Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Design Help

I have a data set that is customer by transaction:

   

NameProductProduct Type
Tom SmithPizzaPepperoni
Tom SmithSubHam
Tom SmithBurger Cheese
John DoePizzaSausage
John DoeSubTurkey
John DoeBurger Bacon
Jane RogersPizzaGarlic
Jane RogersSubPortabello
Jane RogersBurger Double
Bill WhitePizzaPepperoni
Bill WhiteSubTurkey
Bill WhiteBurger 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:

   

PizzaSub# Customers
PepperoniHam2
SausageTurkey1
GarlicPortabello1

Any suggestions on application design or query structures?

Thanks

1 Solution

Accepted Solutions
maxgro
MVP
MVP

dimensions

aggr(Only({$ <Product={Pizza}>} [Product Type]), Name)

aggr(Only({$ <Product={Sub}>} [Product Type]), Name)

expression

count({$ <Product={Pizza,Sub}>} DISTINCT Name)

View solution in original post

1 Reply
maxgro
MVP
MVP

dimensions

aggr(Only({$ <Product={Pizza}>} [Product Type]), Name)

aggr(Only({$ <Product={Sub}>} [Product Type]), Name)

expression

count({$ <Product={Pizza,Sub}>} DISTINCT Name)