3 Replies Latest reply on Jan 21, 2019 10:10 AM by Alex Kerin

    Hexbin Maps and Filtering Underlying Data

    Russell Warden

      Hello!

       

      I have created hexbins for data on a map that scale when zoomed in and out (using the cos and sin functions).  I also included the following tweak on my slightly different formulas:

       

       

      I have implemented the solution Jeffrey gave to show the symbols on a map and it works great. The problem I am having now is that I can't see the underlying data when I click on a specific mark. The goal is to be able to click on the mark and then have a second sheet update with the record list that falls under that mark. Since I can't get the underlying data view to work, I can't update the other sheet. When I click to show underlying data, I get the location of the symbol and a count but the full data is just blank.

       

       

       

      I finally solved my own problem. The issue seems to be that the data ends up as a float. As such hexbins that don't land on nice round numbers would fail to show underlying data. So I modified the formulas as such:
      round(HEXBINX(round([Longitude]*[Ratio],6),round([Latitude]*[Ratio],6))/((100*[Ratio])/100),6)
      round(HEXBINY(round([Longitude]*[Ratio],6),round([Latitude]*[Ratio],6))/[Ratio],6)

      Knocking off digits longer than 6 after the decimal allowed it to work. Then I made a sheet with the rows of the records and added it to my dashboard and then used the map as a filter for that sheet so when I click a bin, I see a list of the records right in the dashboard.

       

       

      But one thing I'm noticing is that when I click the hexbin elements on the map, I can only see the underlying records based on the part of the hexbin I click.  If I click Pad 1 or Pad 6 (where data exists), then I will see the data held in each of those points.  But I can't see a list of all the data in all pads in the drawn hexagon.

       

      Is there any way to make it where when I click the hexbin, all the data from each pad is displayed?

       

      Thanks!

        • 1. Re: Hexbin Maps and Filtering Underlying Data
          Sarah Battersby

          It might just be an issue of what fields you are using to trigger the action to filter or highlight.  I just made a quick example with an old dataset using the data densification method to render the bins... by setting a highlight action to trigger based on the hex lat and lon (not the table calc used to actually render the polygon on the map), I can successfully highlight with interaction on any of the vertices or the filled polygon.  So, maybe just try changing what fields are used in your action to list the underlying data?

           

          -Sarah

          Tableau Research 

          1 of 1 people found this helpful
          • 2. Re: Hexbin Maps and Filtering Underlying Data
            Russell Warden

            You are my new best friend!!!

            • 3. Re: Hexbin Maps and Filtering Underlying Data
              Alex Kerin

              Piggybacking on this post - I was having an issue with filtering on hexagons. With the action target set to all fields, some hexagons would filter fine, others would filter every row out. I suspect there's a bug with the way lat and long for the filter action is calculated between the sheets.I then created a 'Hex ID' which was simply the sum of the lat and long, and used that as a source/target. This fixed some hexes, and broke others.

               

              Finally, changing the hex ID calc to "str(hex lat) and str (hex long)" and using this as the source and target filter seems to fix all of them.