Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have received a requirement of below:
Product | Shop | Sales Quantity |
---|---|---|
A | S1 | 2 |
B | S2 | 5 |
C | S1 | 1 |
D | S1 | 7 |
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
=SUM({<Shop = p({1<Product = {'A'}>}Shop)>}[Sales Quantity])
=SUM({<Product = p({1<Shop = {'S1'}>}Product)>}[Sales Quantity])
Hi Manish,
Thx for quick reply!
How about if there is not only one shop has Product A?
Product | Shop | Sales Quantity |
---|---|---|
A | S1 | 2 |
B | S2 | 5 |
C | S1 | 1 |
D | S1 | 7 |
A | S2 | 3 |
C | S3 | 3 |
B | S3 | 2 |
B | S4 | 1 |
C | S4 | 1 |
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
I didn't get your logic. Please explain..
=SUM({<Shop = {'S1','S2'}>}[Sales Quantity])
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
=SUM({<Shop = p({1<Product = {'A'}>}Shop)>}[Sales Quantity])
Thx! It Works