16.1 Count date by year and month

 

Here below is a data table:

imagepng

Now we want to calculate the sum of values in column Val by the year and month in column Date, the result is as follows:

imagepng

Script:

=spl("=E(?1).run(Date=date(""18991230"",""yyyyMMdd"")+Date).groups(month@y(Date):YM;sum(Val):Total)",A1:B11)

Group the dates in column Date by year and month, and then calculate the sum of the corresponding data in column Val; the option @y following the month means that the parameter includes the year data, and a 6-digit number will be returned. 


esProc Desktop and Excel Processing
15.9 Parse and extract Key-Value pair
16.2 Calculate time repeat interval