3 Replies Latest reply on Dec 8, 2016 2:09 PM by German Priks

    Peer groups using quick filters on secondary datasource

    German Priks



      I'm trying to combine in one view an aggregated value using a blended data source and a specific row value, both dictated by the user's choice in a quick filter.


      I can do it with a parameter-based filter instead of a quick filter by creating a calculated field like one below, but unfortunately, this option is not available to me due to parameter values falling outside of security control options (as far as I know).


      IF [Location Name] = [Selected Location in Parameter]*

      THEN [Tourist Attractions]



      *The calculation works because to Tableau the parameter value is constant even though from the user point of view, the quick filter value is just as constant.


      In the attached workbook the basic mock-up setup is that I have two data sources: Attractions data and Peer groups. The first one includes the number of attractions in each city and the second one specifies the peer group for each city. So, London is peered with itself, Paris and New York; Edinburgh is peered with itself and Salzburg, etc. What I want to see is the number of attractions for each city, and next to it on the same row, the average number of attractions across that city's peer group. By blending on Location Name I can get the peer average, and by blending on Location Code I can get the individual value, but not both at the same time. Perhaps there is a solution involving table calculations, but so far I've struggled to get anything meaningful with them.


      Any pointers would be most appreciated.