Difference between Dates
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
I have a dataset (sample at the bottom) containing different dates for each ID. I want to calculate difference between each date in Date column for a ID.
Ex - For ID "A", I want to calculate difference between date 1 and date 2 and date 2 and date 3.
I know how to do it in Excel, but the dataset is huge. Please provide your valuable inputs.
Thanks,
Anudeep
ID | Date |
A | 13/04/2021 |
A | 28/04/2021 |
A | 04/12/2021 |
B | 26/04/2020 |
B | 27/10/2020 |
B | 17/11/2020 |
B | 22/03/2021 |
B | 01/07/2021 |
B | 09/10/2021 |
B | 09/03/2022 |
B | 31/08/2022 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Use multirow formula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Multi-row formula grouped by your ID should work.
I use datetime diff taking the prior row date away from the current row date and returning the number of days.
This ensures a reset each ID
Hence the first row of each record is null.
Note. Make sure your dates are the date data format to compute a datetimediff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
