Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

Calculation of market share

Hi,

 

I would like to calculate the number of units Vs the category. for example

 

(sum(unit_quantity*quantity_delivered)
/
Sum({<[Subcategory2]={GetFieldSelections(Subcategory2)}>} unit_quantity*quantity_delivered))-1

If I select my brand XX who's is in the Subcategory2: cookies

I would like to calculate the amount of "my" cookies (because I selected my brand in the brand list) Vs the amount of all cookies (that has not been selected in any Subcategory2 List)

 

Thank's for your help

 

10 Replies
Anil_Babu_Samineni

Perhaps just this?

(sum(unit_quantity*quantity_delivered)
/
Sum({<[Subcategory2]=P(Subcategory2)>} unit_quantity*quantity_delivered))-1

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Try this

(Sum(unit_quantity * quantity_delivered)
/
Sum({<[Subcategory2] = P([Subcategory2]), Brand>} unit_quantity * quantity_delivered)) - 1
ecabanas
Creator II
Creator II
Author

Hi all

 

This formula did not works, I did the manual calculation to show what I'm looking for,

 

Thank's for your help again

2019-05-08_16h27_13.png

thank you guys

 

 

sunny_talwar

Try this

Sum(unit_quantity * quantity_delivered)
/
Sum(TOTAL <Category> unit_quantity * quantity_delivered)
ecabanas
Creator II
Creator II
Author

Hi Sunny,

Thank's for your patience.

I've isolated the denominator, and I play with the selectors to see how the amount changes (which it shouldn't) and if it changes when I change the selectors. If I select a name, brand, this amount changes but should not, I need to know the units of the total of the category


If I apply a condition like Brand=, EAN= the problem is that if I include this formula the table shows the rest of selections

2019-05-08_17h19_17.png

 

sunny_talwar

Use if statement my friend

If(WeightSold Expression <> 0, Weight Sold Category Expression)
ecabanas
Creator II
Creator II
Author

I put this if statement in the expression and eliminate all the dimensions and I only left one (name)

 

If(Sum( {<name=>}TOTAL <SubFamilia2> unit_quantity * quantity_delivered) <> 0, 
Sum( {<name=>}TOTAL <SubFamilia2> unit_quantity * quantity_delivered))

But the result is the same

2019-05-08_17h43_37.png

sunny_talwar

No idea what you want. You keep on changing the requirement description with each post. Can you please clearly state what you have and what you want?

ecabanas
Creator II
Creator II
Author

Hi sunny

 

Yes is very clear what I'm looking for:

This calculation, independently in the denominator the selections. Only care the category selected to know the number of units that the category has

 

If I select two units from a category, how could I know the number of units that this category has (all the units, not only the selected)

Thank's