Forum Discussion
Fab117
Helper IV
2 years agoMonthly workload summing each phase from each project
Hello, I'm looking for the best approach to represent monthly workload for all our projects considering theoretical workload (field [Workload [%]]) for each phases. I've a data set looking th...
- 2 years ago
Hello, Fab117,
I think I got you:Btw I think I found some issues in your calculations as 31-3 = 28 but it's not 93% but 90% but other than that it seems working. Based on your example.
Here's the file:
Fab117
Helper IV
2 years agoThanks vojtechsima,
I spent few more hours on it this morning.
Finaly, I tried to mimic your code in adanced editor until your step "Removed Duplicates1":
// Ajout de la colonne "key"
key = Table.AddColumn(#"Changed Type", "key", each Text.Combine( {Text.From([ProjectId]), [Projects.ProjectOwnerName], [Project Phase] }), type text),
startDate = ()=>
let
#"Sorted Rows" = Table.Sort(Source,{{"TaskBaselines.TaskBaselineStartDate", Order.Ascending}}),
Buffer = Table.Buffer(#"Sorted Rows"),
#"Removed Duplicates" = Table.Distinct(Buffer, {"key"})
in
#"Removed Duplicates",
endDate = ()=>
let
desc = Table.Sort(key,{{"TaskBaselines.TaskBaselineFinishDate", Order.Descending}}),
Buffer = Table.Buffer(desc),
#"Removed Duplicates" = Table.Distinct(Buffer, {"key"})
in
#"Removed Duplicates",
startDateColumn = Table.AddJoinColumn(key, "key", startDate(), "key", "earliestStartDate"),
expandColumnStart = Table.ExpandTableColumn(startDateColumn, "earliestStartDate", {"TaskBaselines.TaskBaselineStartDate"}, {"earliestStartDate"}),
endDateColumn = Table.AddJoinColumn(expandColumnStart, "key", endDate(), "key", "latestDueDate"),
expandColumnEnd = Table.ExpandTableColumn(endDateColumn, "latestDueDate", {"TaskBaselines.TaskBaselineFinishDate"}, {"latestDueDate"}),
#"Removed Duplicates1" = Table.Distinct(expandColumnEnd, {"key", "earliestStartDate", "latestDueDate"})
in
#"Removed Duplicates1"
But I face an error I was not able to solve:
Any idea on what is wrong?
Fab
vojtechsima
Super User
2 years ago- Fab1172 years ago
Helper IV
Thank you for spotting a mystake I should have seen.
I'm nearly there (should finalize tomorow).
Big thanksFab