Hello,
I have a DAX code of getting last working day of the month that works and I'm trying to find a better way of writing the Power Query version of it.
I am trying to create a company calendar table. I have a list non-weekend dates that are company and vacation days off. From this I created the following in Power query and DAX:
Date | Year | Month | Year Month | IsWorkingDay |
2024-01-04 | 2024 | 01 | 2024-01 | Y |
2024-01-05 | 2024 | 01 | 2024-01 | N |
... | ... | ... | ... | ... |
2024-03-29 | 2024 | 03 | 2024-03 | N |
So for January it was a normal month so last working day would be Jan 31. In March we had a vacation so last working day was Mar 28 (29 is vacation, 30 and 31 is Sat and Sun)
For DAX I got the last working day of the month by using the following code:
I'm open to suggestions for making the above more efficient. For Power Query I used the following code:
Now for the Power Query i get the same output, but it takes forever to load, so i'm thinking there's a much better way of doing this, but i'm not as familiar with Power Query