Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Finding intermediary routes automatically in map

Hi all,

 

I'm tasked with creating a map that allows Sales to determine building connection routes. I have a list of so called presence points;

a building which is a central location and connects via cable to other buildings that belong to us (a direct route).

 

LightTheWay_0-1652362054528.png

 

However, not all of the buildings in the list connect directly to every other building in the list (see below example, Frankfurt and London)

 

LightTheWay_1-1652362112239.png

If I overlay the two buildings, I can see that they both go to Amsterdam, but to separate buildings in Amsterdam, so to create a route between London and Frankfurt, there'd need to be a 3rd connection in Amsterdam (London -> Amsterdam.  Amsterdam <- -   ->Amsterdam.  Amsterdam -> Frankfurt

 

What I'd like to be able to do is select 2 buildings (A and Z end) and the map to calculate the route (with all the intermediary hops) and not require sales to figure out the 3rd, 4th or 5th potential hops to connect the buildings. This is akin to creating a train journey planner; select a starting point and destination, and the 'behind-the-scenes magic' calculates the route and all the stations the train passes through to get there.

 

Any advice would be greatly appreciated!

 

1 REPLY 1
AlexisOlson
Super User
Super User

Dijkstra's algorithm and the A* search are the classic solutions to the Shortest Path Problem. However, these are not going to be easy to implement in DAX due to their recursive nature. I'd recommend pre-computing all pairs upstream of DAX (using your preferred programming language) by implementing Floyd-Warshall or Johnson's algorithm.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors