2 Replies Latest reply on Apr 13, 2018 2:28 PM by Deepak Rai

    Aggregation on a group based on a selection of any its member

    fuyu.chen

      Hi,

       

      Given that I have data

       

      State
      City
      Value
      New YorkCity110
      New YorkCity22
      CaliforniaCity43
      CaliforniaCity515
      CaliforniaCity611

       

      I would like to calculate the aggregation result for each State based on the selection of City

      For example, if I select City1 or City2, should return 12 as sum, if I select City4, City5 or City6, should return 29 as sum.

       

      If I just simple use filter, it won't work, as the filter will remove the data for other cities even they are belong to the same State.

       

      Any ideas how this can be done in Tableau?