This is working for me:
NetWorkDays(Date#([Request_Date], 'DD/MM/YYYY'), Date#([End_Date], 'DD/MM/YYYY')) as [Working Days],
Num(Date#([End_Date], 'DD/MM/YYYY') - Date#([Request_Date], 'DD/MM/YYYY')) as Difference;
LOAD * INLINE [
As you said it should be working I created a new app from scratch (attached) and now it seems to work fine, so the problem might be in my original application. Maybe it's something related to what Jonathan Dienst said in his reply.
Anyway, I'll further investigate in that direction.
Thank you very much.
Just in case, please check that you're setting the function's parameters in the right order, i.e. (initial_date, end_date).
I think part of my problem was that I was using NetWorkDays(end_date,initial_date), which is wrong.
Anyway, if needed, reply and attach a data sample. I'll try to help you.
Are the dates proper date values or are they strings? If they are strings, then I strongly recommend that you convert these to date values when you load the data:
Date#(myStringDateValue, '... source date format ...') As Date,
What do your dates actually look like?
And you can certainly use the function the way you are doing it.