Start & End Date Buckets
I have a date field and a variable field. See the example table below.
Date | Field |
1/1/2018 | A |
1/2/2018 | A |
1/3/2018 | B |
1/4/2018 | B |
1/5/2018 | A |
I need a table (preferably cross table) that looks like this.
Start | End | Field |
1/1/2018 | 1/2/2018 | A |
1/3/2018 | 1/4/2018 | B |
1/5/2018 | 1/5/2018 | A |
I'm just not sure on how to do this. Another challenge is that the original data is not sorted like the first table. I was able to accomplish this in Excel using a formula that created a count when the field value changes but that only works when the original data is sorted.
Thanks in advance.
+ Add a Comment