I'm not sure I understood this quite right, but lets see if this works for you. It sounds like you need to group datatable2 on EmpNo and CostID to get the sum of BudgetNo, then join the grouped data with datatable1. The join would have EmpNo, BudgetNo, and CostID from datatable1 and BudgetNo from the grouped data. You can then create a DataView based on the joined data which has a column calculated as the difference between the two BudgetNo columns.
Hello All,
I am new to google visualization. I want to display data from two lists combinely as output to Column Chart.
I have two lists master and parent list and based on the data from that, I want to create a column chart. I created a javascript file added google and required reference.
I created two datatables
datatble1 (master data unique rows ) and datatble2 (child rows data multiple entries) as
var dataJobNumber = new google.visualization.DataTable();
dataJobNumber.addColumn('number', 'Emp No');
dataJobNumber.addColumn('number', 'Budget Amount');
dataJobNumber.addColumn('number', 'CostID');
The data I am getting in format as for both datatables
row : 12345,111111,4444444.11111 and similarly data in other rows
In datatable 2 there are multiple entries for empno and costID (e.g: 12345 as empno and 4444444.11111).
I want to have a datatble that will be created based on the datable1 and datatble2 say as dattable3 which will actually generate columnchart.
datatble2 e.g:
EmpNo BudgetNo CostID
12345,111111,4444444.11111
12345,111111,4444444.11111 //// and other rows
In this case (I tried group function) I want output as
12345,222222,4444444.11111 (since all multiple entries based on empno and costId should get added for budget amount value).
Then this Budget amount for example 222222 for empid 1234 and costid 444444.11111 I want to substract from master table datatble and get that value output in datatble3
final datatble should be (emp no , budget amount (master table budget emount - sum (all budget amount for empid and costid), costid
The data in example is dummy, but it will be in that very same format like (11111,111111.2222224,13232)
Please help me on this
thanks in advance