3 Replies Latest reply on Nov 9, 2017 8:48 PM by Abhilash Sharma

    Comparing measures to different levels of a hierarchy

    Peter Kosztolanyi

      I am using the following datasource in tableau:

       

      ContinentCountryCitySales
      EuropeUnited KingdomLondon10
      EuropeUnited KingdomSheffield20
      North AmericaUSANew York40
      North AmericaCanadaOttawa50
      EuropeGermanyBerlin30

       

      In Tableau the location is organised into a hierarchy (Continent -> Country -> City) and the Sales is a simple measure.

       

      I need to show the share of sales in a specific city vs the total sales in the parent country/continent. For example if the users select London from a filter or parameter and I need to show them:

      • Share of Country Sales: 33% (10 in London / 30 in UK)
      • Share of Continent Sales: 17% (10 in London / 60 in Europe)

       

      There must be an easy way of doing it.