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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.