The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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)
@Anonymous , New Column
=
Datediff([Date], minx(filter(Table, [order_ID] =earlier([order_ID] ) && [Date] > earlier([Date]) ) , [Date]), Day)
thank you
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
67 | |
36 | |
21 | |
18 | |
15 |
User | Count |
---|---|
122 | |
39 | |
30 | |
24 | |
22 |