Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Example data is below.
Date | Item |
1/5/2024 | XX |
1/20/2024 | XX |
1/20/2024 | XX |
1/15/2024 | XY |
1/20/2024 | XY |
1/25/2024 | XY |
I am trying to group by Item and compare the original date (earliest date) with the modified date to see how much delay was caused.
How can I group by Item and compare the dates? Thanks
Ideally, a third column would have something like this (in days):
Difference |
blank() |
15 |
0 |
blank() |
5 |
5 |
Solved! Go to Solution.
Here's a Power Query solution:
1. Group by Item and add columns Min Date and All (all rows):
2. Click the double arrow on the All column and select Date:
3. Add a custom column Delay:
Duration.Days([Date] - [Min Date])
4. Result:
Proud to be a Super User!
Here's a Power Query solution:
1. Group by Item and add columns Min Date and All (all rows):
2. Click the double arrow on the All column and select Date:
3. Add a custom column Delay:
Duration.Days([Date] - [Min Date])
4. Result:
Proud to be a Super User!
User | Count |
---|---|
84 | |
76 | |
75 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |