Forum Discussion

luzsoulez's avatar
luzsoulez
Helper I
3 years ago
Solved

Day list between 2 dates without weekend

Hi, I have created a custom column to get all the days between 2 dates, but I want to exclude saturday and sundays #"Added Custom" = Table.AddColumn(#"Changed Type3", "Transaction Date", each { Num...
  • BA_Pete's avatar
    3 years ago

    Hi luzsoulez ,

     

    Try using this calculation in a new custom column. You should be able to remove a number of your steps once implemented:

    List.Select(
        List.Transform(
            {Number.From([Start Date])..Number.From([End Date])},
            each Date.From(_)
        ),
        each Date.DayOfWeek(_, 1) < 5
    )

     

    Pete