Hi I am trying to replicate a sumproduct I use with SQL but am struggling. I have some values for some asset types and another table with weightings.
R1 TBL1
R2 Sim Type A Type B Type C
R3 1 1.836 1.794 1.153
R4 2 1.629 1.128 1.928
R5 3 1.616 1.956 1.411
R6 4 1.350 1.590 1.958
R7
R8
R9 TBL2
R10 Asset ID Type A Type B Type C
R11 BA Der 12% 2% 5%
R12 BSL ENH 0% 20% 1%
R13 BSL Der 42% 6% 7%
In Excel I use the following formulas to create my output:
Output (formulas)
Sim BA Der BSL ENH
1 =SUMPRODUCT(B3:D3,$B$11:$D$11) =SUMPRODUCT(B3:D3,$B$12:$D$12)
2 =SUMPRODUCT(B4:D4,$B$11:$D$11) =SUMPRODUCT(B4:D4,$B$12:$D$12)
3 =SUMPRODUCT(B5:D5,$B$11:$D$11) =SUMPRODUCT(B5:D5,$B$12:$D$12)
4 =SUMPRODUCT(B6:D6,$B$11:$D$11) =SUMPRODUCT(B6:D6,$B$12:$D$12)
Output (values)
Sim BA Der BSL ENH
1 0.313824843 0.37037487
2 0.314473553 0.244925331
3 0.303555238 0.405301715
4 0.291739471 0.33764572
So essentially I am using SUMPRODUCT to apply different weighting categories to the simulations
I am looking to do this in Access or SQL Server, any suggestions?