Data Function to calculate table with two columns (dynamic pivot table)

Hi, I am very new to data functions. I have implemented them but now would like to start writing my own.

 

I have a datatable with two three columns. Wellname, Date, OilRate

I would like to create a new table that can sum up the OilRate for each Date if multiple Wellnames are marked.

Its sort of a dynamic pivot table on date and oilrate. So I can select multiple wells and pivot the data into a datatable.

(ie. lets say you have two different Wellnames, both have Date=12/1/2015, 1/1/2016, ect..... and OilRate numbers for each of these dates

I would like to create a datatable that has two columns: Date and (Sum OilRate) all ordered by date.

Please see below:

Original Table:

Wellname Date OilRate
Well1 12/1/2015 10
Well1 1/1/2016 15
Well2 12/1/2015 100
Well2 1/1/2016 150

 

New Table:

Date OilRateSum  
12/1/2015 110  
1/1/2016 165  

 

Any help on this would be amazing! I would like to get started figuring these out for myself.

 

(2) Answers

Login