83 - Days between, remove weekends (Power Query)

Published: 09 August 2024
on channel: WesleySon
292
4

Recreating DAX's NetWorkdays function.
I want a function that returns the number of non-weekend days between two days.

After I made my own function I decided to google if others had solved the problem, and found ImkeF (‪@thebiccountant‬ )'s solution: https://community.fabric.microsoft.co...

Her function is a proper copy of NetWorkdays since she allows an optional list of holidays.


00:00 Premise
00:53 Parameters
01:11 Blank query
01:26 List between start and end date
02:23 Weekday
03:22 Create the function
04:08 ImkeF, optionally remove holidays
04:54 List.Dates
05:37 If holidays-list exists
06:04 List.Select
07:07 Call with a holidays-list
07:32 Call with no list