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
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.
Anonymous
I dont see the same behaviour when i recreate it on PowerBI.
When i select something from the slicer then the table shows me the share of this product across all the products and not of its own.
Any chance to share your file or show with couple of images the desired output?
- Anonymous7 years agoNot applicable
themistoklis Thanks, but i've managed to work it out, by adding an "ALL Filter in the calculation of the category.
Thank you again for your time!