Forum Discussion
Help with List.Generate between two dates
- 3 years ago
Hi, use the custom column
{Number.From([Start Date])..Number.From([Exit Date]) }
then expand the list .This article of mine describes nicely how to generate those dates
https://www.linkedin.com/pulse/hr-reporting-generating-records-between-start-end-values-dontsova/?trackingId=MpZxmQguRYuOR%2BXY8OmiLA%3D%3D
I am using this to generate rows of dates between two dates with varying frequencies in power query
let freq = [FREQUENCY] in let enddate = [End Date] in List.Generate(()=> [Start Date], each Date.From(_) <=Date.From(enddate), each Date.AddDays(_,freq))
Question
is there a way to exclude the start date when generating the rows of dates, I need the list to be exclusive of the start and end dates and have them not included in the list. Hopefully without changing the whole line of code entirely