Forum Discussion
Anonymous
4 years agoNot applicable
Measure for time difference between non-consecutive rows?
Hi, I'm fairly new to Power BI so forgive me if this is a common question, I couldn't find anything specific to non-consecutive, variable distance rows. I'm trying to calculate the total delivery...
- Anonymous4 years ago
Hi Anonymous ,
Please refer to my pbix to see if it helps you.
Create a measure.
Measure = VAR _min_arrive = CALCULATE ( MIN ( 'Table'[Arrive] ), FILTER ( ALL ( 'Table' ), 'Table'[Truck Name] = SELECTEDVALUE ( 'Table'[Truck Name] ) ) ) VAR _max_time = CALCULATE ( MAX ( 'Table'[Depart] ), FILTER ( ALL ( 'Table' ), 'Table'[Truck Name] = SELECTEDVALUE ( 'Table'[Truck Name] ) ) ) RETURN _max_time - _min_arriveIf I have misunderstood your meaning, please provide your desired output and pbix without privacy information.
Best Regards
Community Support Team _ Polly
Whitewater100
4 years agoSolution Sage
Hello:
Please see solution file attached. https://drive.google.com/file/d/1akPQxeppWYb5ePklqODvgHxcSGXejnGI/view?usp=sharing
You might want to play around with the time formats. Hope this helps!