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 could help me to work out!

 

Condition: There are 5 market segments and multiple brands competing in each market segment. The data table is as below

 

 

Market SegmentBrandQty Sold
EntryA2
MainB3
HighC11
PremiumD23
LuxuryE11
EntryE2
PremiumD33
LuxuryA11
LuxuryC3
LuxuryC4
HighC1
HighF2
EntryE3
HighC11
EntryA9
EntryG2
EntryH2
EntryI2
HighC1
EntryF2
EntryE3
HighC11
EntryA9

 

Question

1. I want to make a bar chart shows category market share(%) by brand as below (in a bar chart) 

 

Chart1BrandA Chart1BrandB Chart1BrandC Chart1BrandD
Entry65% Entry0% Entry0% Entry0%
High0% High0% High83% High0%
Luxury35% Luxury0% Luxury17% Luxury0%
Main0% Main100% Main0% Main0%
Premium0% Premium0% Premium0% Premium100%


2. I want to make a bar chart shows category market share(%) by brand and by Ranking 

 * Ranking: Ranking based on total number of Qty sales in total (Sum of all product category: Entry, Main, High, Premium, Luxury)

 

Chart1BrandD Chart1BrandC Chart1BrandA Chart1BrandE
Entry0% Entry0% Entry65% Entry42%
High0% High83% High0% High0%
Luxury0% Luxury17% Luxury35% Luxury58%
Main0% Main0% Main0% Main0%
Premium100% Premium0% Premium0% Premium0%
  • 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

     

8 Replies

  • PattemManohar's avatar
    PattemManohar
    Icon for Community Champion rankCommunity Champion

    junoglasgow Just to confirm, the expected output (the last two tabular data) is not aligned with the sample data. It just sample layout that you are expecting isn't it ? 

    • junoglasgow's avatar
      junoglasgow
      Frequent Visitor

      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.

       

      • PattemManohar's avatar
        PattemManohar
        Icon for Community Champion rankCommunity Champion

        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"

         

         

         

         

         

         

  • junoglasgow's avatar
    junoglasgow
    Frequent Visitor

    I fixed the example table, now they are in line with with data

    Can Anyone help me out this, please?

    • PattemManohar's avatar
      PattemManohar
      Icon for Community Champion rankCommunity Champion

      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