distance calculation
1 TopicHow to Find Nearest Elements to a Selected Item Using X and Y Coordinates in Power BI?
Hello everyone, I'm working on a Power BI report with data that includes X and Y coordinates for each item. I'd like to implement a feature that allows users to select an item and see a list or table displaying the closest items to it. I was able to calculate the distance of each item to a fixed coordinate in a column, but I couldn’t make that reference coordinate change based on the item selected in the slicer. Current Setup: A dataset with X and Y coordinates columns for each item. A data slicer that allows the selection of a specific item. Objective: Calculate the distance between the selected item and other items. Sort these items based on their proximity to the selected item. Display the nearest items in a table or other visualization in Power BI. Questions: Is it possible to achieve this directly in Power BI using DAX or any other built-in functionality? Is there an alternative approach to display the nearest items based on coordinates, perhaps using a map visual or a custom visual in Power BI? Thank you in advance for any suggestions or DAX examples you can provide!Solved1.2KViews0likes4Comments