Forum Discussion

junoglasgow's avatar
junoglasgow
Frequent Visitor
7 years ago
Solved

Market share(%) by category

Hi   I am trying to make the bar charts show Market share by each market segment. I have looked up all post but could not find a good case I am looking for. It would be much appreciated if you coul...
  • PattemManohar's avatar
    PattemManohar
    7 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