With some help from the community I have managed to get to the below function. I am trying to work out how to get the resampled date to run to the latest date that appears i