Forum Discussion
GPX files to Power BI
- 11 months ago
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]))*6371Final result:
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?
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:
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?