Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.
Become a Premium Member and unlock a new, free course in leading technologies each month.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
type
TIntegerArray=Array of Integer; // integer Weigth of each task
TDoubleArray=Array of Double; // float %age of each task / total goal duration
procedure CalcTasksToGoalPercentage(TaskWeights:TIntegerArray;Var TaskGoalPercent:TDoubleArray);
Var
i,S:Integer;
begin
S:=0;
for i:=0 to High(TaskWeights) do S:=S+TaskWeights[i];
SetLength(TaskGoalPercent,Length(TaskWeights));
for i:=0 to High(TaskWeights) do TaskGoalPercent[i]:=TaskWeights[i]/S*100;
end;
function GetTotalGoalCompletion(TaskGoalPercent,TaskCompleteness:TDoubleArray):Double;
Var
i:Integer;
begin
Result:=0;
for i:=0 to High(TaskWeights) do Result:=Result+TaskGoalPercent[i]*TaskCompleteness[i]/100; // adjust 2 %age multiplication by dividing/100
end;
At this stage, I don't have a magic formula.
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.