Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Market Share

Hi Guys,

I have a table which contains some conditional dimensions and expressions. One of the expression is market share, I am using the following expression for market share:

sum(sales)/sum(TOTAL<Dimension>Sales)

I am getting correct market share but lets say i increased the dimensions from 3 to 10, then if i go by the above fromula then i will have to write all the 10 dimensions in the angle bracket.

Is there any other method to calculate market share? Please help guys..................I am attaching the data file and the qvw file for the reference...........

4 Replies
Gysbert_Wassenaar

Nope, you'll have to add the dimensions to the expression. Unless you want to precalculate the shares in the script. That's going to be a bit messy though. It's certainly not less work.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert for the Reply.

But i have a small doubt on that also. Lets say I put 10 dimension in the formula and i select only four dimesnions, will that give me correct market share?

Not applicable
Author

Let's say my expression for the market share is:

Sum(sales)/sum(TOTAL<Dim1, Dim2, Dim3, Dim4, Dim5>Sales)

and my current selection  is:

Product

Dim1

Dim2

Dim3

Market Share

Will it show me the correct market share?

Anonymous
Not applicable
Author

You can use a string that contains a list of selected dimensions, for example in a variable DimensionList.  Or function GetFieldSelections, if your dimensions don't contain spaces.  Your expression would be

Sum(sales)/sum(TOTAL<$(DimensionList)>Sales)