I'm trying to make a table that will sum a the product of a value and probability based on a criteria value in another column. The table below is an example of what I'm trying to do:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Criteria[/TD]
[TD]Prob[/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[TD]2022[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]100%[/TD]
[TD]41[/TD]
[TD]10[/TD]
[TD]75[/TD]
[TD]150[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]90%[/TD]
[TD][/TD]
[TD]24[/TD]
[TD]24[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]Y[/TD]
[TD]65%[/TD]
[TD][/TD]
[TD]53[/TD]
[TD]160[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]70%[/TD]
[TD][/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]70%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[TD]2022[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]41[/TD]
[TD]49.1[/TD]
[TD]96.6[/TD]
[TD]171.6[/TD]
[/TR]
[TR]
[TD]Y[/TD]
[TD]0[/TD]
[TD]34.45[/TD]
[TD]104[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
Instead of just hard-coding the SUM and Product function in the bottom table, I would like to use equations so I can just add more rows or columns to the top table and have the bottom table automatically update. If tried playing around with the PRODUCT, IF, and SUMIF equations, but I can't seem to get any of them to work.
Any suggestions?
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Criteria[/TD]
[TD]Prob[/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[TD]2022[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]100%[/TD]
[TD]41[/TD]
[TD]10[/TD]
[TD]75[/TD]
[TD]150[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]90%[/TD]
[TD][/TD]
[TD]24[/TD]
[TD]24[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]Y[/TD]
[TD]65%[/TD]
[TD][/TD]
[TD]53[/TD]
[TD]160[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]70%[/TD]
[TD][/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]70%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[TD]2022[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]41[/TD]
[TD]49.1[/TD]
[TD]96.6[/TD]
[TD]171.6[/TD]
[/TR]
[TR]
[TD]Y[/TD]
[TD]0[/TD]
[TD]34.45[/TD]
[TD]104[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
Instead of just hard-coding the SUM and Product function in the bottom table, I would like to use equations so I can just add more rows or columns to the top table and have the bottom table automatically update. If tried playing around with the PRODUCT, IF, and SUMIF equations, but I can't seem to get any of them to work.
Any suggestions?