Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Revenue for Customers who bough two Products

Hi

I'm wanting to show Top 10 Customers per Revenue in Category A, but only customers who bought products from Category B

Any idea?

I tried this:

sum({<ProdCode={"sum({<ProdCode={'A'}>0 and sum({<ProdCode={'B'}>0"}>} Amount)

but it's returning No data to display

Any ideas?

1 Solution

Accepted Solutions
MayilVahanan

Hi

May be, try some thing  like this

Customer as Dimension:

sum( {<Customer = P({1<ProdCode={‘B’}>} Customer), ProdCode = {'A'}>} Amount)


In dimension limit, select Show only Largest 10 values

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

Hi

May be, try some thing  like this

Customer as Dimension:

sum( {<Customer = P({1<ProdCode={‘B’}>} Customer), ProdCode = {'A'}>} Amount)


In dimension limit, select Show only Largest 10 values

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

sum({<Customers = P({<ProdCode={'B'}>})}, ProdCode={'A'}>} Amount)


Regards,

Jagan.

lironbaram
Partner - Master III
Partner - Master III

you can use something like

sum({<customerID=p({<ProdCode={"B"}>}customerID)>}Sales)r

this expression calculate sales only for customers who purchased something in category b

hope it helps you