Forum Discussion
Calculating Expected Due/Completion Date Time based on SLA & Created Date Time
Hi,
Looking for a help on DateTime Caculation.
I have a table with Unique Tasks Ids and its allocated dateTime and each of it has an SLA in days defined.
I need to create every Task's expected Completion date as per its SLA considering WorkingDays i.e. WeekDays.
The challenge is, eg. 2 Tasks can have same allocated Date Time with different SLA and the expected date time should have time precision. Eg. below;
Thanks !
| Task ID | Allocate DateTime | SLA Days | Expected_Completion DateTime |
| 2100 | 24/01/2020 15:06 | 1 | 27/01/2020 15:06 |
| 2101 | 24/01/2020 15:06 | 5 | 31/01/2020 15:06 |
| 2102 | 28/01/2020 12:05 | 2 | 30/01/2020 12:05 |
- Anonymous6 years agoQUOTIENT = QUOTIENT(WEEKDAY(Test[Allocate DateTime],1)+Test[SLA Days],7)Expected End Date = Test[Allocate DateTime]+Test[SLA Days]+2*Test[QUOTIENT]Thanks,Pravin
11 Replies
- az38
Community Champion
Hi Anonymous
use technique from this thread
https://community.powerbi.com/t5/Desktop/Add-working-days-to-a-date/td-p/146945
do not hesitate to give a kudo to useful posts and mark solutions as solution
- AnonymousNot applicable
Many thanks for your response Anonymous !
I have tried that and the only issue is adding the Days to the Rank.
In my case the value "10" is SLA and Dynamic coming from another Table, where the SLA for each datetime in the row.
When I try to add it to the Rank (as the last parameter), it asks for aggrregation, where the output fails, since though the datetime it referes could be same but the SLA are different - (my table example above) !
Appreciate your help on it ..
Add 10 woring days = LOOKUPVALUE(Canlendar[Date],Canlendar[Identify],1,Canlendar[Rank1],Canlendar[Rank1]+10)
- az38
Community Champion
Anonymous
try something like
+SELECTEDVALUE(YourTable[SLA Days])
do not hesitate to give a kudo to useful posts and mark solutions as solution
- AnonymousNot applicable
refer this one
https://community.powerbi.com/t5/Desktop/Add-working-days-to-a-date/td-p/146945
You need create date table and also you need to identify which one weekday and weekend in date table only and link date table on allocation date.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.- AnonymousNot applicable
Try this one as well
New column=
var Quotient_=QUOTIENT(WEEKDAY(Test[Allocate DateTime],1)+Test[SLA Days],7)
return
Expected End Date = Test[Allocate DateTime]+Test[SLA Days]+2*Quotient_Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.