Forum Discussion
Work out dates between one column on multi rows
- 1 year ago
In the attached, the same query adapted to a changed column name from Date Notified to createdon.
It produces just short of 900k rows so I've reduced it to one row (to be able to attach it here) which means you'll need to refresh the query to see those rows. it takes a few seconds to generate those rows…
Where did you get the date changed column from please as its not in my dataset
Date Changed column is a custom column created just to make sure we have an end date.
How it's done is through creating an Index Column starting from 1. Post this, I used Source[#"Date Notified"] { _ + 1 }
{ _ + } --> By defualt, Index starts from 0, so this gives me one up to the original index number
Source[#"Date Notified"] --> This part says Go to Source table and specifically to the Date Notified Column
So, put together, this piece of code / Date Changed Column says "Go to Source Table and pick up Date Notified column, row number x ( x being the index that we created)
10-02-2025 --> Go to Source Table, pick up Date Notifed Column, Row number 1
and so on.