Go to bed. Sleep it off.

I remember Dax when she was still a virgin...
I’m guessing that you’re one of the laid off pipeline workers that jumped right into the programmer field. Looks like the transition is going well.
What is DAX?
I assume this is the DAX software you are referring to
https://en.m.wikipedia.org/wiki/DAX_(application)
FFS, what are you talking about?
Fix your title to something that makes sense.
This is not stackoverflow.com. But if you had looked there, you would have found a half dozen solutions in various programming languages.. Hope you didn’t spend 2 weeks trying to avoid doing a 31 element loop. That’ll take some CPU time to recoup. :)
Lucky for us, we dodged that bullet.
(for a while . . .)
For those that remember formatting blue screen WordPerfect . . .
Then crazy formulas in Excel
Then TSQL and leaps and falls trying .NET structures cuz “ . . . it’s gonna solve everything!”.
Then SSRS
Then we leaped, back to the future, in re-birthed “R”.
Gonna get back to DAX or similar MS lockdown junk for the PowerBi crapola folks seem to want today.
The strangle hold systems and tools get on people can be a tough thing to break free from. Sometimes, teach ‘em a lesson and just give ‘em what they ask for and watch the heads roll.
If it’s such a big, big world, why does the same shiite keep floating back up to the top?.
Analog guy here with a simple solution. Get a calendar and a pencil. Start numbering work days each month. If you choose, you can then add them up to find workdays in a year. For your own personal work days available, If you have two weeks vacation, 50 weeks times M-F 5 is 250 days max, minus taken holidays.
Since i am in an ambulatory animal health care profession as a solo Lone Ranger, that number of work days is general 365, except for Leap year.
I am trying really really hard not to be FRivolous and sarcastic.
https://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Scripting_languages

=NETWORKDAYS (start_date, end_date, [holidays])
The holidays part is optional.