Forum Discussion
Market share(%) by category
- 8 years ago
junoglasgow Please try below:
Add "New Table"
MarketBrandOutput = SUMMARIZE(MarketBrand,MarketBrand[Brand],MarketBrand[MarketSegment],"MarkSegTotal",SUM(MarketBrand[Qty]))
Add two additional fields using "New Column" option as below
BrandTotal = CALCULATE(SUM(MarketBrandOutput[MarkSegTotal]),FILTER(ALL(MarketBrandOutput),MarketBrandOutput[Brand]=EARLIER(MarketBrandOutput[Brand])))
Share% = DIVIDE(MarketBrandOutput[MarkSegTotal],MarketBrandOutput[BrandTotal])
Finally, your output will look like this...
Just representing the above data in Matrix visual, for your reference
PattemManohar appreciate your reply, You are right. I created tabular tables just to demonstrate how the bar chart should look like. these are not aligned with the sample data.
junoglasgow Thanks for confirming that.
Please try this for your 1st Requirement, by using "New Table" option
MarketShareByBrand = SUMMARIZECOLUMNS(MarketBrand[MarketSegment],MarketBrand[Brand],"Total",SUM(MarketBrand[Qty]))
Then in the chart visual, change the "Value" field to "Show Value as -> Percent of Grand Total". You can have one chart and a slicer on Brand instead of having different charts for each brand. If you want different charts for each brand, then have a "Visual Level Filter"
- junoglasgow8 years agoFrequent Visitor
Appreciate your help, I Try it but it keep saying that "The expression refers to multiple columns, Multiple columns cannot be converted to a scalar value.
I try this "New measure" option
- PattemManohar8 years ago
Community Champion
junoglasgow As mentioned above, please try using "New Table" option- junoglasgow8 years agoFrequent Visitor
I made it as guided but it only shows % of Grand total. I want to see % of subtotal for a specific brand.
For example, Brand A market share 74% in Entry / Brand A Market share 34% in Luxury / 85% market share in Premium etc..