Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

List.Generate() Passing Parameters - Power Query

Hi Community,   I am using List.Generate to create a loop function in power query. This loop is running on start date & end date for each iteration, which I am getting from within the loop. The s...
  • Greg_Deckler's avatar
    8 years ago

    Not exactly like yours, but this worked for me:

     

    let
     StartDate = #date(2017,01,01), 
     EndDate = #date(2018,01,31),
     GeneratedList = List.Generate(()=>StartDate, each _ < EndDate, each Date.AddMonths(_,1))
    in
        GeneratedList