Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
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)
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
15 | |
15 | |
13 | |
11 | |
10 |
User | Count |
---|---|
11 | |
10 | |
6 | |
6 | |
6 |