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

Filter countries sales quantity in expression

Hi all,

I have columns Orderno, Country, SalesQty, SalesAmount,ItemNo_, BrandName.

Now I want use BrandName as dimension and In one expression I would like to get count of all No items belongs to that brand and 2nd expression how many are sold in particular country.

Example. Brand is Givenchy and it sells 100 products this is first expression, and In 2nd expression I would like to see how many of these 100 item sold in UK lets say 40.

example results:

Brand No.Total Available ItemNo. of Items sold in UK
Givenchy                       100              40

Thank you in advance.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Yes, like:

Exp2: Count({<Country={'USA'}>} Distinct ItemNo_)

View solution in original post

6 Replies
tresesco
MVP
MVP

Try like:

Exp1: Count( Distinct ItemNo_)

Exp2: Sum({<Country={'UK'}>}SalesAmount)

madhuqliklondon
Creator II
Creator II
Author

Hi Tresesco,

In Exp 2 ,I want to count how many item sold but not the amount. Is that correct in that expression and If I want to and another country let's say USA can I add it as well?

raviityou
Partner - Creator
Partner - Creator

you  can use ,

Aggr( Count(ItemNo_),Country,BrandName),

share sample .qvw

sunny_talwar

May be try tresesco‌'s 2nd expression like this

Count(Distinct {<Country={'UK'}>} ItemNo_)

tresesco
MVP
MVP

Yes, like:

Exp2: Count({<Country={'USA'}>} Distinct ItemNo_)

madhuqliklondon
Creator II
Creator II
Author

Both Sunny's and Tresesco's Exp 2 are working.

Thank you