Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Please Help,
I have worked on this for some time and can't seem to find a solution online.
I am needing to add 3 Workdays to an Application date. The application date can be any day of the year, but the workdays can not inlcude weekends or holidays.
So if the ApplicationDate is 8/18/2021, the date I need returned would be 8/23/2021.
If the ApplicationDate is 8/21/2021, the date I need returned would be 8/25/2021.
I am getting close, I just can't seem to get it exact 100%.
Working Day =
SWITCH(
TRUE(),
ISBLANK('Calendar'[IsHoliday])
&& 'Calendar'[Day of Week] <> 0
&& 'Calendar'[Day of Week] <> 6 , "Working Day",
ISBLANK('Calendar'[IsHoliday])
&& 'Calendar'[Day of Week] = 0
|| 'Calendar'[Day of Week] = 6 , "Weekend",
"Holidays")IsWorkDay = SWITCH(
TRUE(),
ISBLANK('Calendar'[IsHoliday])
&& 'Calendar'[Day of Week] <> 0
&& 'Calendar'[Day of Week] <> 6 , "2",
ISBLANK('Calendar'[IsHoliday])
&& 'Calendar'[Day of Week] = 0
|| 'Calendar'[Day of Week] = 6 , "1",
"1")Rank = RANKX(FILTER('Calendar','Calendar'[IsWorkDay]=2),'Calendar'[FullDateAlternateKey],,ASC,Dense)Add3Days = LOOKUPVALUE('Calendar'[FullDateAlternateKey],'Calendar'[IsWorkDay],2,'Calendar'[Rank],'Calendar'[Rank]+3)
Thank you,
Solved! Go to Solution.
Since counting in PQ starts at 0, you need to subtract 1 from the working days to get correct value from the list of working days.
Here is the function version, updated with that.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I create a sample to demonstrate the solution. Basically I created flag and rank column before getting the add 3 days column, check the pbix if needed.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
What I did is bascially the same thing. You will notice on first date, you added 3 days and it brings back 1/7/21. That's incorrect. It should be 1/6/21.
Please see this video for how to do this (in M or DAX).
(14) Power BI - Tales from the Front #03 - Due Date From Working Days - YouTube
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I have watched this video and it doesnt work for what I am trying to do. I saw that you posted this on another thread. I am not sure you read my post.
The approach should work here too. Basically, in DAX or M, you filter out a list/table of the dates beyond your start date (go out 5-7 days based on worst-case scendario of weekend/holiday that might occur), filter those to just working days, and choose the 3rd value in your case.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
The issue this causes, is when the start date in on a non working day... See below image.
For example, if the start date is 1/2/21(Saturday), 3 workdays from that date is 1/6/21(Wednesday)... Not the 7th that was returned.
I built out exactly how you did.
Since counting in PQ starts at 0, you need to subtract 1 from the working days to get correct value from the list of working days.
Here is the function version, updated with that.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |