Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello:
I want to get time difference in above dataset .Can some body help to solve this problem?
regards.
Solved! Go to Solution.
@ryan_mayu Thanks for reply. I like to get Time difference as i mentioned in my problem discription before. I solved it the concept of indexing like this way.
Mean . How much time the car takes traveling from Point1 to Pont2 and i got minutes now . There is some ambiguity in the result for exemple when car num change from 91 to 32,time difference is huge and it will solveble also and the expression i used is :
TIME = 'Table'[Date]-IF('Table'[Index]=0,'Table'[Date],LOOKUPVALUE('Table'[Date],'Table'[Index],'Table'[Index]-1))
The problem is solved now.
@amitchandak Thanks for your kind intiation in solving my problem.
Hi @mohsin-raza ,
Thank you very much for your feedback! If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
@mohsin-raza , create new columns like
datetime = [Dtum_aktiv-Copy.1] +[Dtum_aktiv-Copy.2]
diff =
[datetime] = maxx(filter(Table,[datetime] <[datetime]),[datetime])
@mohsin-raza ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
serienummer | Datum | Distans |
91 | 2021-06-01 05:28 | 0,000 |
91 | 2021-06-01 06:13 | 37,465 |
91 | 2021-06-01 06:32 | 11,545 |
91 | 2021-06-01 07:05 | 27,904 |
91 | 2021-06-01 07:56 | 40,581 |
91 | 2021-06-01 08:13 | 5,340 |
91 | 2021-06-01 08:31 | 9,787 |
91 | 2021-06-01 08:47 | 4,455 |
91 | 2021-06-01 09:40 | 30,358 |
32 | 2021-06-01 04:38 | 0,000 |
32 | 2021-06-01 06:01 | 68,783 |
32 | 2021-06-01 06:09 | 1,278 |
32 | 2021-06-01 06:26 | 11,753 |
32 | 2021-06-01 06:47 | 11,197 |
32 | 2021-06-01 07:02 | 1,874 |
32 | 2021-06-01 07:18 | 3,559 |
32 | 2021-06-01 07:37 | 6,595 |
32 | 2021-06-01 07:45 | 1,396 |
32 | 2021-06-01 07:54 | 3,201 |
This is the dataset, where 91 and 32 are two cars .Process is that (Car 91) start at 2021-06-01 05:28 from (Point 1)and reach at (Point 2 )at 2021-06-01 06:13 and covering distan 37 km and then from (Point 2) to (Point 3) it reach at 2021-06-01 06:32 cover distance 11 km . I want to calculate difference in Time(Time difference with respect to Points and more ) here. Hope you understand the problem.
91 | 2021-06-01 05:28 | 0,000 |
First row goes like above.
They comebine both datum and distance
is this what you want?
Column =
VAR _last=maxx(FILTER('Table','Table'[serienummer]=EARLIER('Table'[serienummer])&&'Table'[Datum]<EARLIER('Table'[Datum])),'Table'[Datum])
return DATEDIFF(_last,'Table'[Datum],SECOND)
Proud to be a Super User!
@ryan_mayu Thanks for reply. I like to get Time difference as i mentioned in my problem discription before. I solved it the concept of indexing like this way.
Mean . How much time the car takes traveling from Point1 to Pont2 and i got minutes now . There is some ambiguity in the result for exemple when car num change from 91 to 32,time difference is huge and it will solveble also and the expression i used is :
TIME = 'Table'[Date]-IF('Table'[Index]=0,'Table'[Date],LOOKUPVALUE('Table'[Date],'Table'[Index],'Table'[Index]-1))
The problem is solved now.
@amitchandak Thanks for your kind intiation in solving my problem.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
133 | |
76 | |
53 | |
38 | |
37 |
User | Count |
---|---|
203 | |
81 | |
71 | |
55 | |
48 |