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
negro57
New Member

Weekly kilometers

I have a table where I register the kilometers that have the vehicles, I want to know the kilometers that traveled, subtracting the settlers the previous week and the settled ones this week.

What I need is to know the weekly kilometers traveled and to be able to compare with the routes in the previous weeks
Sorry for my english, I hope you understood me, thank you

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

 

@negro57

 

create a calculated colum:

 

KRecorridosP =
CALCULATE (
    SUM ( Table1[Kilometros] ),
    FILTER ( ALLEXCEPT ( Table1,Table1[Dominio] ), Table1[Fecha] = EARLIER ( Table1[Fecha] ) - 7 )
)

 

 

 




Lima - Peru

View solution in original post

6 REPLIES 6
negro57
New Member

 

Presentación1.jpg

 

I need in each row to calculate the number of km made by the vehicle from the previous load

 

Captura de pantalla 2017-01-16 15.08.40.png

I do not understand why it does not complete the data in the column (column)

Vvelarde
Community Champion
Community Champion

 

@negro57

 

create a calculated colum:

 

KRecorridosP =
CALCULATE (
    SUM ( Table1[Kilometros] ),
    FILTER ( ALLEXCEPT ( Table1,Table1[Dominio] ), Table1[Fecha] = EARLIER ( Table1[Fecha] ) - 7 )
)

 

 

 




Lima - Peru

So now I only have to subtract kilometers and this column excellent thousand thanks

tringuyenminh92
Memorable Member
Memorable Member

Hi @negro57,

 

Could you please share your data sample or data structure and your expectation as picture? so I could quickly figure out and propose solution.Smiley Very Happy 

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.