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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Lewdis_
Frequent Visitor

GPX files to Power BI

I have GPX files loaded to Power BI and have two problems

  1. The files only incluedes start and end time. Meaning if the route started at 08:30:25 and ended at 08:55:25 i cant get the column to show actual time of the route only the time of the day
  2. I dont have the distance I only have Long and Lat points between each time it measures.

 

So my question is, how can I create a measure that calculates the actual time from start to end of each row for each race? 

How can i track the distance between each captured points. Also needs to start from 0 when a new race is loaded to the dataset.

 

Below is what i have from the GPX file.

Lewdis__2-1759391222643.png

 

 

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Lewdis_ ,

 

I would do some additional columns on your model instead of measures directly that would allow you to do a simple sum in the model instead of iterating over all your column to get the final values.

 

I don't see the end time neither the lat and long of the arrival on the example you gave but I supposed that you have that column also on your model.

 

Add the following two columns on Power Query:

Duration will have the following code:

[End]-[Time]

Distance will have the following code:
Number.Acos( Number.Sin([lat])*Number.Sin([lat2])+Number.Cos([lat])*Number.Cos([lat2])*Number.Cos([long2]-[Long]))*6371

 

Final result:

MFelix_0-1759394837620.pngMFelix_1-1759394854776.png

 

Now you can do the calculations has you need based on the two new columns.

 

Concerning the start from 0 how do you identify each of the races? do you have an ID?

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Lewdis_ ,

 

I would do some additional columns on your model instead of measures directly that would allow you to do a simple sum in the model instead of iterating over all your column to get the final values.

 

I don't see the end time neither the lat and long of the arrival on the example you gave but I supposed that you have that column also on your model.

 

Add the following two columns on Power Query:

Duration will have the following code:

[End]-[Time]

Distance will have the following code:
Number.Acos( Number.Sin([lat])*Number.Sin([lat2])+Number.Cos([lat])*Number.Cos([lat2])*Number.Cos([long2]-[Long]))*6371

 

Final result:

MFelix_0-1759394837620.pngMFelix_1-1759394854776.png

 

Now you can do the calculations has you need based on the two new columns.

 

Concerning the start from 0 how do you identify each of the races? do you have an ID?

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.