1 Reply Latest reply on Aug 13, 2019 8:26 AM by Jim Dehner

    Market share per brand per zone

    NEWSHA MIRZAIE

      I have joined 2 data tabs and want to calculate the market share of each car brand sold in each zip code then in each retail zone then overall. Each retail zone is composed of several zip codes. Database sample is attached.

       

      My Excel tab 1 includes: "Retail Zone ID" and "Zip Code Coverage"

      My Excel tab 2 includes: "Brand", "Zip code", "unit(s) sold". I know how to join the 2 tabs in Tableau using UNION.

       

      I want to eventually have a pivot table in Tableau to show:

      1. Brand market share per Zip Code (I.e. total number of BMW sold in zip code 21001/ total number of units sold in zip code 21001)

      2. Brand market share per Retail Zone ID (I.e. total number of BMW sold in Retail Zone ID RP22/ total number of units sold in Retail Zone ID R22)

      2. Brand market share in total sample (I.e. total number of BMW sold/ total number of units sold)

       

      I attach my Excel data sample. I appreciate your help sharing the formula or attaching the Tableau file.

       

      Thanks,

        • 1. Re: Market share per brand per zone
          Jim Dehner

          Hi I opened your excel and have some questions -

           

          you would join the 2 on zip

           

          then create the viz

           

          using table calc for % of total set like this at the zip level

           

          and this overall

           

           

          you will filter out the null zip - it is your total sales (should not be in the data set - bad practice to have 2 levels of aggregation in the same data file

           

          this is a text table version

           

           

           

          or maybe something like this

           

           

          Jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.