Forum Discussion

amirabedhiafi's avatar
amirabedhiafi
Impactful Individual
5 years ago
Solved

Grouping Dates by Object

I’m working on an object hire report that needs to group objects with consecutive borrowed on dates into a single row in a table visual. The columns are;

Object No
Borrowed Date
Returned Date

Using SWITCH to calculate the Start Date and End Date dynamically based on a date slicer. What I need to do now is combine those two into a single line when the borrowed date(s) are consecutive days.

In this screen shot, the last two lines need to be combined into a single row with the start date being 18/01/2021 and the end date being 19/01/2021. The dates in the slicer are 01/01/2021 to 30/01/2021 which is why the first lines start and end dates are blank.

I’ve uploaded a cleaned copy of the report.