Footer Callback Total of Column By Distinct Columns

Footer Callback Total of Column By Distinct Columns

cpshartcpshart Posts: 246Questions: 49Answers: 5

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hi

I am using the Footer Callback as described in the blog post
https://datatables.net/examples/advanced_init/footer_callback.html

I have replicated the above test case for my requirements

https://jsfiddle.net/cpshart/s478gvcj/47/

The above report shows the dividend payments made by each stock and the value of each stock in a given portfolio ( Hypothetical Figures ).

``` In this example the stock holdings across portfolios are as follows
Portfolio Symbol Value
DEA GSK 26000
ISA RLSEB 30000
ISA GSK 44000
DEA RLSEB 20000

So in the example the total value would be the sum of the Value figures above ``` 120000 ```

On 2020-11-30 RLSEB payment due £30 dividend
On 2021-02-30 RLSEB payment due £50 dividend
etc.

```

I need to write the total of the Value field using Footer Callback for each unique key value of <Portfolio><Symbol>

Any help much appreciated.

Many Thanks

Colin

Answers

This discussion has been closed.