Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello all,
How can I create a column that shows me how many days have passed between diffrent dates?
Dates | Day Between |
Monday, 3. Aug 2020 | |
Friday, 31. Jul 2020 | 3 |
Thursday, 30. Jul 2020 | 1 |
Monday, 20. Jul 2020 | 10 |
Tuesday, 14. Jul 2020 | 6 |
Thank you in advance for your time.
Hi @Anonymous ,
Incase you want a measure
Dates B =
var a = MAX(Table1[Date])
var _prevdate = CALCULATE(MAX(Table1[Date]) , FILTER(ALL(Table1),Table1[Date] < a))
RETURN
DATEDIFF(_prevdate,a,DAY)
Incase you want a Column
Prev Date =
var _prevdate = CALCULATE(MAX(Table1[Date]) , FILTER(Table1,Table1[Date] < EARLIER(Table1[Date])))
RETURN
DATEDIFF(_prevdate,Table1[Date],DAY)
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
ColumnB = VAR _theDate = TableD[Dates]
VAR _1higherDate = MINX(FILTER(TableD, TableD[Dates] > _theDate), TableD[Dates] )
RETURN
DATEDIFF( _theDate, _1higherDate, DAY)