Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
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)
User | Count |
---|---|
19 | |
18 | |
16 | |
13 | |
13 |
User | Count |
---|---|
9 | |
8 | |
8 | |
7 | |
6 |