Forum Discussion
Creating a market share
- 7 years ago
Anonymous
Create a measure like the following:
% Share = VAR Volume = SUM('Table'[Sales]) VAR AllVolume = CALCULATE ( SUM('Table'[Sales]),ALL('Table'[Calcuated_Column]) ) RETURN DIVIDE ( Volume, AllVolume )And then create a new Table object and add your calculated column as dimension and next to it add then above measure
Thank you themistoklis!
What if I want to add another slicer for the products?
Anonymous
Can you please explain further what you are trying to do with the new slicer?
- Anonymous7 years agoNot applicable
themistoklisWell, your measure works for calculating the share of the products from the calculated column but when I select a product from that column from a slicer it seems to divide itself and the result is always 100%. What I want is to have a product slicer where, when i select some of the products from that category, it shows their share.
- themistoklis7 years agoCommunity Champion
Anonymous
Then Product will be displayed as a slicer where you can select the product you want.
Then on the table object you will add the category field (as dimension) which contains all categories across all products and also add similar measure which will look like this:
% Share = VAR Volume = SUM('Table'[Sales]) VAR AllVolume = CALCULATE ( SUM('Table'[Sales]),ALL('Table'[Category]) ) RETURN DIVIDE ( Volume, AllVolume )- Anonymous7 years agoNot applicable
Maybe I'm not making myself clear. Let me try to explain.
Your measure is perfect when calculating the market share of the products that i have in the calculated column.
But when i add a slicer with the products from the calculated column and select any of them, the measure shows the share of the product/the share of the same product, which will always be 100%, when the denominator should be the whole market in that category.