Scoring weighted permutations

dmj120

Active Member
Joined
Jan 5, 2010
Messages
304
Office Version
  1. 365
  2. 2019
  3. 2010
I am spinning.... I'm trying to create a "confidence score" based upon several factors: dm lbr, dm parts, sm lbr, sm parts are either 0 or >0, and mixed in this are 'conditions' is a PM required, are PM parts needed, and finally are the dm lbr and sm lbr hours (from another workbook) yes or no, respectively.

Any advise?? By "spinning" I mean I have made several different attempts....below is where I'm currently at.

I found a niffty permutations formula to start with all combinations:
LET(A,B4:I5,B,ROWS(A),C,COLUMNS(A),D,B^C,E,UNIQUE(MAKEARRAY(D,C,LAMBDA(rw,cl,INDEX(IF(A="","",A),MOD(CEILING(rw/(D/(B^cl)),1)-1,B)+1,cl)))),FILTER(E,MMULT(--(E<>""),SEQUENCE(C,,,0))=C))


Generate Permutations.xlsx
ABCDEFGHIJKLMNOPQ
1
2FSWPdevice/mdl compr
3dm lbrsm lbrdm prtssm partsPM Req'dPM prtsDM LbrSM Lbr
4>0>0>0>0nononono
50000yesyesyesyes
6
7Multipliers
84231if 'no' 3*0.5if 'no' 1*0.5if 'no' 4*0.5if 'no' 4*0.5
9
10X6Y6Z6AA6D6E6BF6BG6O6
11dm lbrdm prtssm lbrsm partsPM Req'dPM prts neededDM Lbr between dvc hi/loSM Lbr between dvc hi/loscoreconfidencehmmmdm lbrdm prtssm lbrsm partsWeighted score
12>0>0>0>0nononono16yes1616812448
13>0>0>0>0nononoyes16yes1616812448
14>0>0>0>0nonoyesno16yes1616812448
15>0>0>0>0nonoyesyes16yes1616812448
16>0>0>0>0noyesnono14yes1416812448
17>0>0>0>0noyesnoyes14yes1416812448
18>0>0>0>0noyesyesno14yes1416812448
19>0>0>0>0noyesyesyes14yes1416812448
20>0>0>0>0yesnonono14yes1416812448
21>0>0>0>0yesnonoyes14yes1416812448
22>0>0>0>0yesnoyesno14yes1416812448
23>0>0>0>0yesnoyesyes14yes1416812448
24>0>0>0>0yesyesnono14yes1416812448
25>0>0>0>0yesyesnoyes14yes1416812448
26>0>0>0>0yesyesyesno14yes1416812448
27>0>0>0>0yesyesyesyes14yes1416812448
28>0>0>00nononono16yes1616812-248
FSWP
Cell Formulas
RangeFormula
J12:J28J12=IF(AND(F12="no",G12="no"),SWITCH(B12,">0",4,-12)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,4)+SWITCH(E12,">0",4,4), IF(AND(F12="yes",G12="yes"),SWITCH(B12,">0",4,-4)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,0)+SWITCH(E12,">0",2,0), IF(AND(F12="yes",G12="no"),SWITCH(B12,">0",4,-4)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,0)+SWITCH(E12,">0",2,2), IF(AND(F12="no",G12="yes"),SWITCH(B12,">0",4,-4)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,4)+SWITCH(A12,">0",2,2) ))))
K12:K28K12=IF(J12>13,"yes",IF(J12<5,"no","partial"))
L12:L28L12=IF(AND(F12="no",G12="no"),SWITCH(B12,">0",4,-12)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,4)+SWITCH(E12,">0",4,4), IF(AND(F12="yes",G12="yes"),SWITCH(B12,">0",4,-4)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,0)+SWITCH(E12,">0",2,0), IF(AND(F12="yes",G12="no"),SWITCH(B12,">0",4,-4)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,0)+SWITCH(E12,">0",2,2), IF(AND(F12="no",G12="yes"),SWITCH(B12,">0",4,-4)+SWITCH(C12,">0",4,-4)+SWITCH(D12,">0",4,4)+SWITCH(A12,">0",2,2) ))))
M12:M28M12=SWITCH(B12,">0",(1*4)*$B$8,(0.5*-12)*$B$8)
N12:N28N12=SWITCH(C12,">0",(1*4)*$C$8,(0.5*-4)*$C$8)
O12:O28O12=SWITCH(D12,">0",(1*4)*$D$8,(0.5*-4)*$D$8)
P12:P28P12=SWITCH(E12,">0",(1*4)*$E$8,(0.5*-4)*$E$8)
Q12:Q28Q12=SUM(SWITCH(B12,">0",(1*4)*$B$8,(0.5*-12)*$B$8),SWITCH(C12,">0",(1*4)*$C$8,(0.5*-4)*$C$8),SWITCH(D12,">0",(1*4)*$D$8,(0.5*-4)*$D$8),SWITCH(D12,">0",(1*4)*$D$8,(0.5*-4)*$D$8))
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
You haven't said what your question is?

But given your heading refers to weighted scores, I am guessing that you are wondering why the results in column Q are as they are?

First observation is that Q12 has: =SUM(SWITCH(B12,">0",(1*4)*$B$8,(0.5*-12)*$B$8),SWITCH(C12,">0",(1*4)*$C$8,(0.5*-4)*$C$8),SWITCH(D12,">0",(1*4)*$D$8,(0.5*-4)*$D$8),SWITCH(D12,">0",(1*4)*$D$8,(0.5*-4)*$D$8))

You have the sum of four terms, the last two of which are duplicates. Presumably the last term should refer to column E, not D, with weight 1, rather than 3?

But let's go with the incorrect formulae just to illustrate how weighting works. All the rows you've shown have the same weighted score (which is 4, not 48) so I have changed Row 13 to illustrate better.

FSWPdevice/mdl compr
dm lbrsm lbrdm prtssm partsPM Req'dPM prtsDM LbrSM Lbr
>0>0>0>0nononono
0000yesyesyesyes
Multipliers
4231if 'no' 3*0.5if 'no' 1*0.5if 'no' 4*0.5if 'no' 4*0.5
X6Y6Z6AA6D6E6BF6BG6O6
dm lbrdm prtssm lbrsm partsPM Req'dPM prts neededDM Lbr between dvc hi/loSM Lbr between dvc hi/loscoreconfidencehmmmdm lbrdm prtssm lbrsm partsWeighted score
>0>0>0>0nononono16yes1616812448
00>0>0nononoyes-8no-8-24-4124-4


In Row 12, each of the four score components are equal to 4, therefore the weighted score will be 4, regardless of the weights.
In Row 13 (as modified) the four score components are equal to -6, -2, 4 and 4.

For a weighted score, you need to divide the calculation by the sum of the weights, like this:

Arrests.xlsx
ABCDEF
1Score 1Score 2Score 3Score 4Weighted score
2Weight4233
3Row 12 scores44444.00
4Row 13 scores-6-244-0.33
Sheet2
Cell Formulas
RangeFormula
F3:F4F3=SUMPRODUCT(B$2:E$2,B3:E3)/SUM(B$2:E$2)
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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