Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

How can we calculate row values for a row depending upon values in remaining row

$
0
0


I want to calculate the missing values for the row New Department which has the following calculation which is based on the values in other rows.

 

DepartmentSub-DepartmentCol1Col2MonthYear
D1D1-136122016
D1D1-225122016
D2D2-143122016
D2D2-235122016
ALLALL508122016
New DepartmentNew Sub-Department10 Required value  


The calculation for the required field is as follows:

Required Value =
( (Col1 * Average of Col2)(for ALL) - ((Col1 * Average of Col2)(for D1-1) +(Col1 * Average of Col2)(for D1-2)+(Col1 * Average of Col2)(for D2-1)+(Col1 * Average of Col2)(for D2-2) ) )/ Col1(for New Department)
= ((8*50) -((3*6)+(2*5)+(4*3)+(3*5)))/10
=(400-(18+10+12+15))/10
= 34.5



I have tried different approaches but did not get the desired result. Please suggest a possible way of achieving this. Please help.


Viewing all articles
Browse latest Browse all 213819

Trending Articles