Forum Discussion
Bug using NETWORKDAYS
- Anonymous3 years ago
Hi EaglesTony ,
In the case of the formula, the hidden <weekend> parameter is the default, and the formula determines that Saturday and Sunday will not be calculated.NETWORKDAYS function (DAX) - DAX | Microsoft Learn
For the first record, the start date is Saturday and the end date is Sunday. There is a one day difference between these two dates, but this day is on Sunday, so it will not be counted, so it returns 0, then subtracts 1 to return -1.
Also for the second record, the difference between the two dates is 0 days, so it returns 0, and then subtracts 1 to return -1.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi EaglesTony ,
In the case of the formula, the hidden <weekend> parameter is the default, and the formula determines that Saturday and Sunday will not be calculated.
NETWORKDAYS function (DAX) - DAX | Microsoft Learn
For the first record, the start date is Saturday and the end date is Sunday. There is a one day difference between these two dates, but this day is on Sunday, so it will not be counted, so it returns 0, then subtracts 1 to return -1.
Also for the second record, the difference between the two dates is 0 days, so it returns 0, and then subtracts 1 to return -1.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Did this work? I do not think the Networkdays works as intended. Please advise.