Forum Discussion
Power BI Hour Difference between two different rows from different column with a condition
sushmitasur4 This is a variation on Previous Row. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586.
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
Tough to say, but you might also need Cthulhu. Cthulhu - Microsoft Fabric Community
Can you post your data as text and provide the expected output?
Or maybe it's simple and you can just do this:
Measure = SUMX( FILTER( 'Table', [Type] = 3 ), [End] - [Start] )
Then convert to seconds and use Chelsie Eiden's Duration? Chelsie Eiden's Duration - Microsoft Fabric Community