March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
DueDate =
VAR _P1 = Test274DateAddExcludeWeekends[CreatedDate] + TIME(2,0,0)
VAR _P2 = Test274DateAddExcludeWeekends[CreatedDate] + TIME(8,0,0)
VAR _P3 = Test274DateAddExcludeWeekends[CreatedDate] + 7
VAR _PreFinal1 = SWITCH(Test274DateAddExcludeWeekends[Priority],1,_P1,2,_P2)
VAR _PreFinal2 = SWITCH(WEEKDAY(_PreFinal1,2),6,_PreFinal1+2,7,_PreFinal1+1)
VAR _Final = IF(ISBLANK(_PreFinal2),_PreFinal1,_PreFinal2)
RETURN IF(Test274DateAddExcludeWeekends[Priority] IN {1,2},_Final,_P3)
@PattemManohar Once again thank you much for helping me out. If I change VAR_P2 to Test274DateAddExcludeWeekends[CreatedDate] + 10 to skip 10 days excluding weekends. The weekends are not getting excluded. Please help..
Actually the new requirement is for P4 and P5 which is 10 and 20 days. So I tried the same logic but not able to achieve it. Based on the created date I have to find the new Due Date excluding weekends. For P4 it should be P4 created date + 10 days excluding weekends.
Kindly help...
Hi @Anonymous ,
For your requirement, you could use the logic of your previous post which has been solved.
You could change the formula be like below.
VAR_P2=Test274DateAddExcludeWeekends[CreatedDate] + DAY(DATE(0,0,10))
Please have a try, if you still need help, please share your data sample which could reproduce your scenario and your desired output so that we could help further on it.
Best Regards,
Cherry
I dont see an option to attach files in this forum. Hence Pasted as screenshot. and data as table.
If you look at the below screenshot. the date for P3 calculation is set to P3 created date + 10 but the new date is not excluding weekends.
ID | Module | Priority | Created | Resolved | Due Date |
2 | Incident | 1 | 22/03/2019 14:00 | 25/03/2019 16:00 | |
3 | Incident | 1 | 22/03/2019 23:00 | 22/03/2019 15:00 | |
4 | Incident | 2 | 22/03/2019 14:00 | ||
5 | Incident | 3 | 22/03/2019 14:00 | ||
6 | Incident | 4 | 22/03/2019 14:00 | ||
7 | Incident | 4 | 23/03/2019 14:00 | ||
8 | Incident | 4 | 24/03/2019 14:00 | ||
9 | Incident | 4 | 25/03/2019 14:00 | ||
10 | Incident | 4 | 26/03/2019 14:00 | ||
11 | Incident | 4 | 27/03/2019 14:00 | ||
12 | Incident | 4 | 28/03/2019 14:00 | ||
13 | Incident | 4 | 29/03/2019 14:00 | ||
14 | Incident | 4 | 30/03/2019 14:00 | ||
15 | Incident | 4 | 31/03/2019 14:00 | ||
16 | Incident | 4 | 01/04/2019 14:00 | ||
17 | Incident | 4 | 02/04/2019 14:00 | ||
18 | Incident | 4 | 03/04/2019 14:00 | ||
19 | Incident | 4 | 04/04/2019 14:00 | ||
20 | Service Request | 1 | 22/03/2019 14:00 | ||
21 | Service Request | 2 | 22/03/2019 14:00 | ||
22 | Service Request | 3 | 22/03/2019 14:00 | ||
23 | Service Request | 4 | 22/03/2019 14:00 | ||
24 | Service Request | 3 | 26/03/2019 21:00 | ||
25 | Incident | 5 | 22/03/2019 14:00 | ||
26 | Incident | 6 | 22/03/2019 14:00 | ||
27 | Incident | 7 | 22/03/2019 14:00 | ||
28 | Incident | 8 | 22/03/2019 14:00 | ||
29 | Incident | 9 | 22/03/2019 14:00 |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
90 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |