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

Calculating data by selected items in listbox

Good day!

I have listbox with BrandName, Shops and Sales by them.

Tell me please, is in QV any way to calculate the following expression?

1. Sum of sales for that rows, which are connected only with selected brands

2. Sum of sales for that rows, which are connected with all selected brands.

For example: I select three brands in list box;

I want to calculate:

1. Sum of sales for only those shops, which bought only first brand

2. Sum of sales for only those shops, which bought only second brand

3. Sum of sales for only those shops, which bought only third brand

4. Sum of sales for only those shops, which bought at least 1 item of first, second and third brand

Examples in attached files.

Thanks.

2 Replies
giakoum
Partner - Master II
Partner - Master II

For 1,2,3 :

Create a table or chart, with brand as dimension and sum(sales) as expression. It will show you sales per selected brands.

Anonymous
Not applicable
Author

In my pivot table i'll have no dimension by brands,i'll have some virtual total dimension and  calculate following expressions by shops:

A. If i select 2 brands, i want to calculate three expressions:

1. Sum by shops, which bought at least one item of first brand and no item for second

2. Sum by shops, which bought at least one item of second brand and no item for the first

3.Sum by shops, which bought at least one item of second and firts brand at the same time.

B. If i select 3 brands, i want to calculate four expressions:

1

2

3

4...