Hi,
Need guidance.
My Table has two date columns StartDate and EndDate with some blank EndDate cells. I'm trying to create a custom column to populate the blank cells with the following logic;
If EndDate is not null then EndDate else StartDate + 2 workdays excluding weekends and holidays.
I'm able to exceute the if statement. however unable to define the statement to exclude weekends and holidays. shared below is the list of holidays.
Please advise how to execute the logic in M Language.
Need guidance.
My Table has two date columns StartDate and EndDate with some blank EndDate cells. I'm trying to create a custom column to populate the blank cells with the following logic;
If EndDate is not null then EndDate else StartDate + 2 workdays excluding weekends and holidays.
I'm able to exceute the if statement. however unable to define the statement to exclude weekends and holidays. shared below is the list of holidays.
Please advise how to execute the logic in M Language.
Date |
01/01/2022 |
01/17/2022 |
02/21/2022 |
05/30/2022 |
07/04/2022 |
09/05/2022 |
10/10/2022 |
11/11/2022 |
11/24/2022 |
12/25/2022 |
01/01/2023 |
01/16/2023 |
02/20/2023 |
05/29/2023 |
07/04/2023 |
09/04/2023 |
10/09/2023 |
11/11/2023 |
11/23/2023 |
12/25/2023 |
01/01/2024 |
01/15/2024 |
02/19/2024 |
05/27/2024 |
07/04/2024 |
09/02/2024 |
10/14/2024 |
11/11/2024 |
11/28/2024 |
12/25/2024 |