Forum Discussion
ConnorH
6 years agoMicrosoft Employee
Finding days between two rows date values
This is kind of complex and I haven't been able to figure it out. I am trying to create a column that finds the number of days between a project status but the project ID must be the same. The projec...
- Anonymous6 years ago
Hi ConnorH ,
Create a Calculated Column
Column = VAR _prevstage_sameprojId_date = CALCULATE ( MAX ( 'Table1'[Modified date] ), FILTER ( 'Table1', 'Table1'[Modified date] < EARLIER ( 'Table1'[Modified date] ) && Table1[Project ID] = EARLIER ( Table1[Project ID] ) ) ) RETURN DATEDIFF ( _prevstage_sameprojId_date, 'Table1'[Modified date], DAY )Regards,
Harsh NathaniAppreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Greg_Deckler
6 years agoCommunity Champion
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