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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Calculate kilometers from gps table, filtered by data segmentation dates

Hello, I am looking for a way to obtain the kilometers traveled from a fleet of trucks which are collected every day and loaded to a table, which is filtered by a segamentation of dates, I have a variable that looks for the minimum date and the maximum date of the gps table but I can not make the subtraction between the mileage of the first selected day value and the mileage of the last selected day. The idea is to be able to show it in a production graph which shows the trucks vs what was produced on the selected dates, the production graph is done only need to add the measure that calculates the km. Could you help me with some data?I leave the data I have so far:Captura3.JPGCaptura1.JPGCaptura2.JPG

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

after a while searching I could find the following measures:

'KMMAX = CALCULATE(Max(KMGPS_TYP[KMTAC]))
KMMIN = CALCULATE(MIN(KMGPS_TYP[KMTAC]))
KMTSRECORRIDOS = [KMMAX] - [KMMIN]'
which gives me the mileage traveled depending on the filtered date range, the issue is that the filter does it only by entering the date of the gps in the filter, with the date of the production does not search, and that both fecchas are related to a calendar table.
anyway it is already solved, thanks anyway. Best regards

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

after a while searching I could find the following measures:

'KMMAX = CALCULATE(Max(KMGPS_TYP[KMTAC]))
KMMIN = CALCULATE(MIN(KMGPS_TYP[KMTAC]))
KMTSRECORRIDOS = [KMMAX] - [KMMIN]'
which gives me the mileage traveled depending on the filtered date range, the issue is that the filter does it only by entering the date of the gps in the filter, with the date of the production does not search, and that both fecchas are related to a calendar table.
anyway it is already solved, thanks anyway. Best regards

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.