Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Imagine I have this table:
Category Product Quantity
A 1 10
A 2 20
A 3 30
B 4 40
B 5 50
B 6 60
I choose Product 1, so the category related to product is A, with the value 10 for Quantity.
I would like to now the percentage of product 1 that was selled in the category A.
So I want Sum of quantity for the product I selected
And then I want Sum of quantity of all products related to the same category that product 1:
So I want quantity of product 1, 2 and 3, all belonging to category A: 10+20+30 = 60
The question is that the only thing I have selected is Product = 1
bottom of line I want something like:
Sum quantity where product = PRODUCT SELECTED / Sum quantity where category = category of PRODUCT SELECTED
How can I achieve this ?
It may be something simple but I'm not getting there.
I will give you more information if this is not enough.
Thanks in advance.
Regards,
Sílvia
Hi Silvia,
Please try :
=num( sum(Quantity) / sum({1<Category = {'$(=Only(Category))'} >}Quantity),'#.##%')
Hi Silvia,
Please try :
=num( sum(Quantity) / sum({1<Category = {'$(=Only(Category))'} >}Quantity),'#.##%')
May be like this:
Text Box:
Sum(Quantity)/Sum({<Product, Category = p(Category)>} Quantity)
Chart: (with Product and Category as Dimensions)
Sum(Quantity)/Sum(TOTAL <Category> {<Product, Category = p(Category)>} Quantity)
Thank you Jonathan,
It works perfectly
Regards,
Sílvia
Thank you Sunny,
You answer also works
Regards,
Sílvia