1 2 3 4 Previous Next 46 Replies Latest reply on Sep 26, 2019 5:55 AM by Carrie Hatcher Go to original post
      • 30. Re: Distance Mapping with Radius Filter
        Javid Beykzadeh

        I followed this tutorial and I am not getting the expected results.  I cannot tell what it is doing.  I want to be able to select a patient from the drop down for example and then be able to show all the doctors within a certain radius using the radius filter.  I think I also got thrown off at the step that said this:

        Lastly – you want to label your points on the map with your distance calculation.  Drag “distance” over to label. 

        It will not populate with distance right away.  You will need to click on it and ‘edit table calculation”.    Once you have clicked on edit table calculation you will want to choose the “advance” option.

        1. Once in advanced you want to make sure to click the radio button labeled “field” and pick the dimension that you built
          your parameters and formulas around your – in my case it’s my business office description.  Be sure to pick “minimum”
          for its value as well.

        In Tableau version 10x there isn't an advanced option there.

         

        Can anyone tell me what it's calculating??

        1 of 1 people found this helpful
        • 31. Re: Distance Mapping with Radius Filter
          Matthew Theis

          Hello Sarah,

           

          I'm trying a similar project to your original post.  I am trying to create a report that will return those U.S. counties that are located within a selected distance from a selected county.  I feel like I've configured my report the same as a couple different reports related to this topic.  Can someone take a look and see where I'm going wrong?

           

          Thanks everyone!

           

          Matthew

          • 32. Re: Distance Mapping with Radius Filter
            Jacquelyn Ferrara

            Hi Sarah,

            I really like your distance filter and feel as though it's a much more simple solution to the radius problem.  I was wondering if anyone could offer insight on a geo mapping project im getting stuck with.

             

             

            I am trying to map four different REIT companies with various mall locations across the United States.  I have US income census data mapped down to geographic coordinates.  I also have the mall property locations mapped down to coordinates.  I want to create a
            map view that I can create a distance parameter for, using the mall location as the center that will allow me to see the varying incomes within a 5, 10, and 15 mile radius of each point.  Please let me know if the overall end-result goal needs verification.  Im attaching a packaged work book.  The first sheet is a dual axis map with all census income data points listed as null, and the mall locations.  I created maps on separate sheets for malls and census income in case it makes more sense to use the filter on a dashboard. But I get stuck with the distance formula. I want to use each mall as a center point and then map the distance of the zip codes from it. Using a filter for distance so that I can just display the zip codes around each mall that lie within 5, 10, and 15 miles.

             

            Thanks all!

            • 33. Re: Distance Mapping with Radius Filter
              naresh.suglani.0

              Hello all,

               

              I managed to get mine working through the great help from Neil Lord in the link below. My dataset consisted of 33 fixed home locations in the UK and over 12,000 shop locations. I can now select each home location using a filter and adjust the distance to anything I like and show the number of shops within the selected radius.

               

              Distance filter not working - Help please

              • 34. Re: Distance Mapping with Radius Filter
                Susan Baier

                I'm hoping somebody (Shawn Wallwork maybe) can help me figure out what I'm doing wrong here.

                 

                I've attached a workbook with dummy score data for schools in Arkansas. I want people to be able to view schools within a 50-mile radius of a school selected in the parameter.

                 

                I've got distances calculating, but they're not calculating based on the school selected in my parameter -- they appear to be calculating based on a central location in the state.

                 

                Workbook attached - please see the "Distance" sheet. I'm grateful for any help you can give me! Thanks!

                • 35. Re: Distance Mapping with Radius Filter
                  naresh.suglani.0

                  Hi Susan I think this down to the fact that in your distance calculation the same instance of latitude and longitude so the origin (selected school) is using the centralised position of the state in which the selected school is in.

                   

                  From the examples I've seen on here and the help I received I would recommend linking to another copy of the school information, showing just the Name and Longs, Lats then match on Name.

                   

                  The calculation would then change to something like the example below. Latitude being from shop locations in my dataset and BDM Latitude being branch manager locations.

                  • 36. Re: Distance Mapping with Radius Filter
                    Susan Baier

                    Hi Naresh,

                     

                    Thanks for jumping in! I really appreciate the help.

                     

                    I added a new dataset just with Name/Lat/Long, and linked via Name. Changed the Distance calc per your suggestion but doesn't seem to be working. I've attached my workbook -- any chance you can help me figure out what's wrong? I have a deadline tonight and would love to get this figured out!!

                    • 37. Re: Distance Mapping with Radius Filter
                      Vincent Tchong

                      Sarah, I know has been a while. I learned this same technique through a Tableau course, but when it came down to doing it again, the Distance filter would not work correctly. Can you provide some guidance as to what I did wrong? The calculated field is exactly as yours. Thank you!

                      • 38. Re: Distance Mapping with Radius Filter
                        Jennifer Zelmanski

                        I know this is old - but I had the same problem; there is a step missing in the step-by-step.  That step is ensuring that the table calculation for distance, which finds the distance between each location and the chosen (by parameter) location, is also sorted such that the parameter site is the 1st one in the list.  The Viz Painter - Mapping Distances An alternate approach (linked earlier in this thread) explains how to do that.  This is a really cool technique - thanks for posting!

                        • 39. Re: Distance Mapping with Radius Filter
                          Joslyn Tijerina

                          Hello! I'm hoping someone can help me figure this out. What I'm trying to do is very similar to the solution posted by Sarah, just might need some modifications that I haven't figured out yet.

                           

                          I have a list of buildings with their address and lat/long (based on zip code - so just an approximation). I also have a list of every zip code in Ohio, and the corresponding lat/long. I want to be able to select any zip code in Ohio and see the distance from the list of buildings. One example is: how many buildings from the list are within a 25 mile radius of zip code 43228?

                           

                          Thanks in advance for any suggestions!

                          • 40. Re: Distance Mapping with Radius Filter
                            Jim Dehner

                            Good morning Joslyn

                             

                            I am pressed for time right now but I did something similar to this just last week

                            the attached is not exactly your problem but may provide direction he wanted to ID all the products sold within a radius (KM in his cast) based on lat and long

                            see the attached

                             

                            Jim

                            If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

                            • 41. Re: Distance Mapping with Radius Filter
                              Jim Dehner

                              sorry I had an appointment this morning

                              One way to do what you want is to use a parameter to ID the selected zip code ( I assume you would want the user to be able to select a starting point

                              then you would use the parameter to identify the zip code as "IN" a set

                               

                              the formula for the distance between the selected point (the set) and any other long and lat pair is  - it returns MIles

                              in this formula a city (v your zip) is selected and the "other long and lat" are the "building values in your data"

                               

                               

                              Then you need a radius - either hard code or parameter drive

                               

                              then you create a filter to show the buildings within that radius as here your LOD would be based on Building

                              and compare the distance in miles to the radius

                               

                               

                               

                              Hope that is not too confusing see previous post for workbook

                               

                              Jim

                               

                              If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

                              1 of 1 people found this helpful
                              • 42. Re: Distance Mapping with Radius Filter
                                Joslyn Tijerina

                                Thanks so much for your response!

                                 

                                This was helpful! However, I'm stuck at creating the radius (you mentioned hard code or parameter driven?).

                                 

                                Right now, I have a map that allows me to type in a zip code in a parameter control and it will calculate the distance from that zip code to the zip codes of the facilities I plotted on the map. However, it does that for all the facilities (which isn't necessarily bad). Can you elaborate on how to add the radius information in there?

                                 

                                Thanks,

                                Joslyn

                                • 43. Re: Distance Mapping with Radius Filter
                                  Jim Dehner

                                  sure and thanks

                                  One of his user requirements was to do this without a map so it is a little different than your case)

                                  first If I hear you correctly you you input a zip code (and that relates to the zip centroid) (that is similar to the example where he used a customer number) and then the distance from that zip centroid to each building

                                   

                                  so far we are on the same track (his calculated to distance to each city where the customer was located) - his use case was to be able to set a radius (using a parameter) and present only the cities (and products) that were inside the radius - to do that i just added a filter that the distance calculated had to be less than the radius -

                                   

                                  in his case this just said if the radius is less than the parameter return a true - and he filtered on that

                                   

                                   

                                  in your case if the formula was called distance      your formula would be     distance<=25 

                                   

                                  YOu could then use that as a filter or if you wanted to color code the ones within 25 miles one color and all the others a different color just place it on the color mark

                                   

                                  Jim

                                  If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

                                  1 of 1 people found this helpful
                                  • 44. Re: Distance Mapping with Radius Filter
                                    Brady OConnell

                                    Hi Sarah,

                                     

                                    thank you for the great post.  I have used this functionality on several dashboards over the last couple of years. 

                                     

                                    My users would like the ability to filter the location instead of using the parameter, which has limitations.  Have you run across this question related to this post.  Say you had a region, Territory, and Office.  Would it be possible to build a location table of offices with pre-defined distances that could be filtered on Region and territory?  I think the beauty of this functionality lies with the defined parameters and there is no way to use a filter but I cannot articulate this point to the customer 

                                     

                                    Is there a way to do this with a filter instead of a parameter?

                                     

                                    thanks,

                                    brady