Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi everyone
I have a table and I am trying to find the date difference by order ID between stages of an order.
I would like a column which tells me the number of days an order waits at each stage. As an example order_ID 1 was at stage A on 01 Jan and then stage B at 14 Jan, therefore the number of days at stage A is 13 days.
your assistance is appreciated
| order_ID | stage | date allocated | Days at stage | 
| 1 | A | 1/01/2022 0:00 | 13 | 
| 1 | B | 14/01/2022 0:00 | 1 | 
| 1 | C | 15/01/2022 0:00 | date now - date allocated | 
| 2 | A | 2/01/2022 0:00 | |
| 2 | C | 6/01/2022 0:00 | 
Solved! Go to Solution.
@Anonymous , New Column
=
Datediff([Date], minx(filter(Table, [order_ID] =earlier([order_ID] ) && [Date] > earlier([Date]) ) , [Date]), Day)
thank you
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
            | User | Count | 
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | 
| User | Count | 
|---|---|
| 24 | |
| 11 | |
| 10 | |
| 9 | |
| 8 |