Forum Discussion

RossBateman96's avatar
1 year ago
Solved

List.Dates function- Count error

Hi As an example, I have a table in the below format. Period startingDate endingDate P1 01/01/2024 28/01/2024 P2 29/01/2024 25/02/2024 P3 26/02/2024 31/03/2024   I want to ...
  • bhanu_gautam's avatar
    1 year ago

    RossBateman96 , try using below mentioned code

     

    Table.AddColumn(#"Removed Columns", "Custom", each if Number.From([endingDate] - [startingDate]) >= 0 then List.Dates([startingDate], Number.From([endingDate] - [startingDate]) + 1, #duration(1,0,0,0)) else null)