# Qlik Sense App Development

Contributor

## How to set analysis in this case?(Qlik Sense)

Hi all,

I have received a requirement of below:

ProductShopSales Quantity
AS12
BS25
CS11
DS17

I would like to set an analysis of summing all the sales quantity if the shop has the Product A

Result should be 2+1+7 =10

Best Regards,

Louis

1 Solution

Accepted Solutions
MVP

## Re: How to set analysis in this case?(Qlik Sense)

=SUM({<Shop = p({1<Product = {'A'}>}Shop)>}[Sales Quantity])

7 Replies
MVP

## Re: How to set analysis in this case?(Qlik Sense)

=SUM({<Product = p({1<Shop = {'S1'}>}Product)>}[Sales Quantity])

Contributor

## Re: How to set analysis in this case?(Qlik Sense)

Hi Manish,

How about if there is not only one shop has Product A?

ProductShopSales Quantity
AS12
BS25
CS11
DS17
AS23
CS33
BS32
BS41
CS41

Result should be 2+1+7+3+5 =18

Sum the quantity of shop S1 and S2 because only these two shop have Product A

Best Regards,

Louis

MVP

MVP

## Re: How to set analysis in this case?(Qlik Sense)

=SUM({<Shop = {'S1','S2'}>}[Sales Quantity])

Contributor

## Re: How to set analysis in this case?(Qlik Sense)

Hi Manish,

I would like to sum all the quantity of those shops if those shops have the Product A.

In table above,

Shop S1 and S2 have the Product A, therefore sum all the quantity of these two shops.

Best Regards,

Louis

MVP

## Re: How to set analysis in this case?(Qlik Sense)

=SUM({<Shop = p({1<Product = {'A'}>}Shop)>}[Sales Quantity])

Contributor

Thx! It Works