Forum Discussion

BTMoylan's avatar
BTMoylan
Frequent Visitor
3 years ago
Solved

Distance Filter Not Working

Hey All!    I am trying to make a contact list that I can filter via business type, and distance to a certain location. The filtering through business type is working perfectly, just set up a slice...
  • BTMoylan's avatar
    3 years ago

    I didn't solve this problem directly but I was able to solve it indirectly. I was able to remove the 'Max Distance' Slicer and replace with a column called Area of Operation in a table also called 'Area of Operation'.

     

    I made a new table, called Area of Operation, that had the name of each organization and then a column that contained the operating radius of that company in kilometers. So then I changed my Points in Proximity equation. You will see that monay of the business have a 5000 KM range. This just means they will travel/deliver anywhere within the state or country and they will always return "In Range". While other companies have a much smaller range of operation. 

     

    Points in Proximity = IF('Organization_Info'[Distance (km)] <= SUM(Area_of_Operation[Area of Operation (km)]),"In Range","Out of Range")
     
    I also had the state columns that could be used as additional filters within the report, as the radius of operation for some these business would be large enough to bleed into that state. I did this because some of these businesses do not operate in that state, even though their radius may extend into a bordering state.
     
    As you will see below, I then made individual slicers for each state column from the 'Area of Operations' table. This allows me to further filter my results by only choosing businesses that operate within that state.
     
    Not the prettiest of solutions but it did allow me to filter my results properly.