Employee forecasting - Multi-criteria calculation

Patrick020

New Member
Joined
Mar 20, 2018
Messages
15
Hello everybody.
<o:p></o:p>
I’m a bit out of my depth with this one!
<o:p></o:p>
Effectively what I am trying to do is calculate the time commitment of each employee based on a number of criteria. <o:p></o:p>
<o:p></o:p>
Each employee is allocated to a number of jobs – the time commitment for each of these jobs is provided in FTE (i.e. if the time required for a job is 2 FTE, this could indicate one employee for two days, or two employees for one day each). <o:p></o:p>
<o:p></o:p>
The Criteria are provided in brackets. <o:p></o:p>
<o:p></o:p>
Please see the below data: <o:p></o:p>
<o:p></o:p>
Job 1<o:p></o:p>
Job 2<o:p></o:p>
Job 3<o:p></o:p>
Job 4<o:p></o:p>
Job 5<o:p></o:p>
Job 6<o:p></o:p>
Answer <o:p></o:p>
Criteria 1 (High)<o:p></o:p>
High<o:p></o:p>
High<o:p></o:p>
Low<o:p></o:p>
High<o:p></o:p>
High<o:p></o:p>
High<o:p></o:p>
Criteria 2 (Yes) <o:p></o:p>
Yes<o:p></o:p>
No <o:p></o:p>
Yes<o:p></o:p>
Yes<o:p></o:p>
Yes<o:p></o:p>
Yes<o:p></o:p>
Days FTE<o:p></o:p>
2.5<o:p></o:p>
3<o:p></o:p>
2<o:p></o:p>
4<o:p></o:p>
1.5<o:p></o:p>
2<o:p></o:p>
Employee 1<o:p></o:p>
N/A<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
N/A<o:p></o:p>
0.5<o:p></o:p>
Employee 2<o:p></o:p>
Primary <o:p></o:p>
N/A<o:p></o:p>
N/A<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
N/A<o:p></o:p>
3<o:p></o:p>
Employee 3<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
N/A<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
Primary<o:p></o:p>
1.5<o:p></o:p>
Employee 4<o:p></o:p>
N/A<o:p></o:p>
N/A<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
N/A<o:p></o:p>
N/A<o:p></o:p>
2<o:p></o:p>
Employee 5<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
Primary<o:p></o:p>
Primary<o:p></o:p>
N/A<o:p></o:p>
Primary<o:p></o:p>
3<o:p></o:p>

<tbody>
</tbody>
<o:p></o:p>
The answer I am trying to calculate has been provided in the final column. <o:p></o:p>
<o:p></o:p>
Taking Employee 1 as an example to explain the logic: Employee 1 is not assigned to Job 1, Job 2, Job 4 or Job 6. Employee 1 is assigned to Job 3 but Criteria 1 is not met so we do not include Job 3 in the calculation. <o:p></o:p>
<o:p></o:p>
Employee 1 is assigned to Job 5 and both criteria are met. This Job takes 1.5 FTE’s and we can see that three employees are assigned to this Job – therefore 1.5 /3 = 0.5 which is the answer.

Thanks for your help
Patrick
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hello everybody.
<o:p></o:p>
I’m a bit out of my depth with this one!
<o:p></o:p>
Effectively what I am trying to do is calculate the time commitment of each employee based on a number of criteria. <o:p></o:p>
<o:p></o:p>
Each employee is allocated to a number of jobs – the time commitment for each of these jobs is provided in FTE (i.e. if the time required for a job is 2 FTE, this could indicate one employee for two days, or two employees for one day each). <o:p></o:p>
<o:p></o:p>
The Criteria are provided in brackets. <o:p></o:p>
<o:p></o:p>
Please see the below data: <o:p></o:p>
<o:p></o:p>
Job 1<o:p></o:p>Job 2<o:p></o:p>Job 3<o:p></o:p>Job 4<o:p></o:p>Job 5<o:p></o:p>Job 6<o:p></o:p>Answer <o:p></o:p>
Criteria 1 (High)<o:p></o:p>High<o:p></o:p>High<o:p></o:p>Low<o:p></o:p>High<o:p></o:p>High<o:p></o:p>High<o:p></o:p>
Criteria 2 (Yes) <o:p></o:p>Yes<o:p></o:p>No <o:p></o:p>Yes<o:p></o:p>Yes<o:p></o:p>Yes<o:p></o:p>Yes<o:p></o:p>
Days FTE<o:p></o:p>2.5<o:p></o:p>3<o:p></o:p>2<o:p></o:p>4<o:p></o:p>1.5<o:p></o:p>2<o:p></o:p>
Employee 1<o:p></o:p>N/A<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>N/A<o:p></o:p>0.5<o:p></o:p>
Employee 2<o:p></o:p>Primary <o:p></o:p>N/A<o:p></o:p>N/A<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>N/A<o:p></o:p>3<o:p></o:p>
Employee 3<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>N/A<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>Primary<o:p></o:p>1.5<o:p></o:p>
Employee 4<o:p></o:p>N/A<o:p></o:p>N/A<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>N/A<o:p></o:p>N/A<o:p></o:p>2<o:p></o:p>
Employee 5<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>Primary<o:p></o:p>Primary<o:p></o:p>N/A<o:p></o:p>Primary<o:p></o:p>3<o:p></o:p>

<tbody>
</tbody>
<o:p></o:p>
The answer I am trying to calculate has been provided in the final column. <o:p></o:p>
<o:p></o:p>
Taking Employee 1 as an example to explain the logic: Employee 1 is not assigned to Job 1, Job 2, Job 4 or Job 6. Employee 1 is assigned to Job 3 but Criteria 1 is not met so we do not include Job 3 in the calculation. <o:p></o:p>
<o:p></o:p>
Employee 1 is assigned to Job 5 and both criteria are met. This Job takes 1.5 FTE’s and we can see that three employees are assigned to this Job – therefore 1.5 /3 = 0.5 which is the answer.

Thanks for your help
Patrick

Hi!

Try the Array Formula (use Ctrl+Shift+Enter to enter the formula) below in H6 and copy down:

=SUM(IF($B6:$G6="Primary",IF($B$2:$G$2="High",IF($B$3:$G$3="Yes",$B$4:$G$4/
MMULT({1,1,1,1,1},--($B$6:$G$10="Primary"))))))


Or

=SUM(IF($B6:$G6="Primary",IF($B$2:$G$2="High",IF($B$3:$G$3="Yes",$B$4:$G$4/
MMULT(TRANSPOSE(ROW(A$6:A$10)/ROW(A$6:A$10)),--($B$6:$G$10="Primary"))))))


Markmzz
 
Last edited:
Upvote 0
Hi!

Try the Array Formula (use Ctrl+Shift+Enter to enter the formula) below in H6 and copy down:

=SUM(IF($B6:$G6="Primary",IF($B$2:$G$2="High",IF($B$3:$G$3="Yes",$B$4:$G$4/
MMULT({1,1,1,1,1},--($B$6:$G$10="Primary"))))))


Or

=SUM(IF($B6:$G6="Primary",IF($B$2:$G$2="High",IF($B$3:$G$3="Yes",$B$4:$G$4/
MMULT(TRANSPOSE(ROW(A$6:A$10)/ROW(A$6:A$10)),--($B$6:$G$10="Primary"))))))


Markmzz

Wow, thank you Markmzz!

Both of these formula worked perfectly (I will use the second given the size of the data) - you've literally saved me at least a weeks worth of work here!

If you don't mind, please can you explain the second half of the formula (MMULT onwards) as I'm struggling to follow the logic you have applied.

Patrick
 
Upvote 0
Wow, thank you Markmzz!
Both of these formula worked perfectly (I will use the second given the size of the data) - you've literally saved me at least a weeks worth of work here!
If you don't mind, please can you explain the second half of the formula (MMULT onwards) as I'm struggling to follow the logic you have applied.
Patrick
Hi!

You're welcome and thanks for the feedback.

Now, I'll try to explain the second part of the formula. In my opinion, the best way to do that is look at the formula step by step.

Lets go:


Job 1Job 2Job 3Job 4Job 5Job 6Answer
Step by Step=MMULT(TRANSPOSE(ROW(A$6:A$10)/ ROW(A$6:A$10)),--($B$6:$G$10="Primary"))The Start Formula
Criteria 1 (High)HighHighLowHighHighHigh

1=MMULT(TRANSPOSE({6;7;8;9;10}/ {6;7;8;9;10}),--($B$6:$G$10="Primary"))Using the ROW function, get the numbers of all the rows in the range B6:B10 ({6;7;8;9;10}) in the fraction ROW(A$6:A$10)/ROW(A$6:A$10).
Criteria 2 (Yes)YesNoYesYesYesYes

2=MMULT(TRANSPOSE({1;1;1;1;1}),
--($B$6:$G$10="Primary"))
Performs the division numbers of lines of range B6:B10 for themselves and get the matrix 5x1 ({1;1;1;1;1}).
Days FTE2,53241,52

3=MMULT({1\1\1\1\1},
--($B$6:$G$10="Primary"))
Using the TRANSPOSE function, get the matrix transpose of the matrix 5x1 ({1;1;1;1;1}) whose result is the matrix 1x5 ({1\1\1\1\1}).







Result
4=MMULT({1\1\1\1\1},
--({FALSE\FALSE\TRUE\FALSE\TRUE\FALSE;
TRUE\FALSE\FALSE\FALSE\TRUE\FALSE;
FALSE\TRUE\FALSE\FALSE\TRUE\TRUE;
FALSE\FALSE\FALSE\TRUE\FALSE\FALSE;
FALSE\TRUE\TRUE\TRUE\FALSE\TRUE})
)
Compares the contents of the cells in the range C6:G10 (distribution of employees by job) with the Primary word and get the matrix 5x6 below
{FALSE\FALSE\TRUE\FALSE\TRUE\FALSE;
TRUE\FALSE\FALSE\FALSE\TRUE\FALSE;
FALSE\TRUE\FALSE\FALSE\TRUE\TRUE;
FALSE\FALSE\FALSE\TRUE\FALSE\FALSE;
FALSE\TRUE\TRUE\TRUE\FALSE\TRUE}
Employee 1N/AN/APrimaryN/APrimaryN/A0,5
5=MMULT({1\1\1\1\1},
{0\0\1\0\1\0;
1\0\0\0\1\0;
0\1\0\0\1\1;
0\0\0\1\0\0;
0\1\1\1\0\1})
Using the multiply by -1 two times (-- or -1*-1) to transform
TRUE in 1 and FALSE in 0 get the matrix 5x6 below
{1\1\1\1\1},
{0\0\1\0\1\0;
1\0\0\0\1\0;
0\1\0\0\1\1;
0\0\0\1\0\0;
0\1\1\1\0\1}
Employee 2PrimaryN/AN/AN/APrimaryN/A3
6={1\2\2\2\3\2}Finally, using the MMULT function multiplies the matrix 1x5 by matrix 5x6 and get the matrix 1x6 in the end
({1\2\2\2\3\2} - with the distribution of employees for each one of the six jobs).
Remember that the first part of the complete formula is enough to make your selection of jobs which meet the criteria. In the case of Employee 2, we have only the first and fifth jobs ({1\0\0\0\3\0}).
Employee 3N/APrimaryN/AN/APrimaryPrimary1,5



Employee 4N/AN/AN/APrimaryN/AN/A2



Employee 5N/APrimaryPrimaryPrimaryN/APrimary3















*******************************************************************************************************************************************************************

<tbody>
</tbody>


I hope that this helps.

Markmzz
 
Upvote 0
Hi!

Just one more detail:

In the case of Employee 2, we have only the first and fifth Jobs and

the penultimate step of the whole formula in this case is SUM({2,5\FALSE\FALSE\FALSE\0,5\FALSE}).

So when we use the function SUM, we get the value 3.

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,984
Messages
6,122,601
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top