1 Reply Latest reply on Apr 30, 2016 6:43 PM by Bill Lyons

    TB 8.2.0 - filter by binary flag indicating max field, grouped by zipcode

    ralph.asher

      First off - I am using TB 8.2.0 and I assume this will be much easier with LOD calcs in TB 9.

       

      I have a dataset of this general format:

       

      Origin Facility

      Destination 5-digit-zipcode - There is one row for each possible origin/destination pair

      "Preference Metric" for that origin/destination pair - the higher, the better

       

      What I want to be able to do in Tableau is create a calculated field that yields a binary result depending upon if the "Preference Metric" for that entry is the maximum metric associated with that destination 5-digit-zipcode.

       

      This binary flag would be dependent upon the current filtering of origin facilities, so if I filter to only 2 origin facilities then the binary flag will find the maximum preference metric between these two origin facilities. if I filter to 35 origin facilities, then the binary flag will find the maximum preference metric between these 35 origin facilities.

       

      The idea being that I can then use this binary flag as a filtering mechanism then color a filled map based upon the most preferred origin facility.

        • 1. Re: TB 8.2.0 - filter by binary flag indicating max field, grouped by zipcode
          Bill Lyons

          Without seeing the data set, this is difficult to answer. However, based on what you describe, the most common way I would have attempted to handle this kind of situation prior to LoD calcs in v9 was to use the self-blend technique. In this, you duplicate the data source (which does not duplicate the data, just the connection to it), and adjust the links between the data sources so, for example, one is filtered for the origin facilities, and the other by zip code. I'm not 100% sure that is what you are looking for, but it is a general direction.

           

          If you can attach a packaged workbook (.twbx), we have a much better probability of being able to help better. If you have confidential data, please see Anonymize your Tableau Package Data for Sharing |Tableau Support Community.

           

          May I ask one more question: why are you still on v8.2? I think that is now 17 months behind.