Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ..
I need to do a weighted average of columns.
I have several columns with very large expressions.
I'm not able to do this weighting because the columns have the SUM function.
Column 1 = sum (my term)
Column 2 = Sum (my term)
Column 3 = Sum (my term)
The weighting is as follows:
sum (Column 1 * Column 2) / sum (Column 2).
Anyone know another way to make weight?
Hi,
If i have understood you, you can try Column() function OR use a column name(if its a calculated column) with double quotes like "Mycolumn".
regards, tresesco
hi
As tresesco suggested use the column function.
(column(1) * coulmn(2)) / column(3)
The problem is that I can not seem to add a column that already has within it the expression SUM. Column 1 = sum (my term) Column 2 = Sum (my term) Column 3 = Sum (my term) Is giving error if I do this: Sum (Column 1), within a column already has the words sum, plus the weighted average I need to use that expression.
Washington wrote:The problem is that I can not seem to add a column that already has within it the expression SUM. Column 1 = sum (my term) Column 2 = Sum (my term) Column 3 = Sum (my term) Is giving error if I do this: Sum (Column 1), within a column already has the words sum, plus the weighted average I need to use that expression.
Perhaps instead of continuing to do what you already posted in the first post and know doesn't work, you should try doing what was suggested?
Deepak Kurup wrote:(column(1) * column(2)) / column(3)
John,
The suggested procedure (column (1) * column (2)) / column (2) have tested more does not work.
On average I have to be weighted by multiplying the sum divided by the sum of another column.
Sum (column (1) * column (2)) / Sum (column (2))
hi,
Sorry its not clear. Can you let us know what should be the exact value in the final column
eg:
A B output
10 3 5
Washington wrote:The suggested procedure (column (1) * column (2)) / column (2) have tested more does not work.
On average I have to be weighted by multiplying the sum divided by the sum of another column.
Sum (column (1) * column (2)) / Sum (column (2))
Sorry. I guess I wasn't understanding the question. I'm still not sure if I'm understanding the question, because looking at your example, it appears that you've already solved your own problem? 62,73 looks like the correct weighted average to me. If that is NOT what you want, can you please explain what numbers you want in the final column, and how you want them computed? Because I'm lost, and it looks like everyone else is too.
Hello.
As the previous comments, it was said that if I do a weighted average of the columns will work.
= sum (col1 * col2) / sum (col2).
Most failed.
When the mean field is done by returning it works the value of 62.73.