Open hgschehl opened 6 years ago
What you're describing here isn't really a pivot table, or at least it's not possible to generate this output given the data you have. Your data would need to be of a structure like:
[
{year: 2016, rows: 'project cost', value: 1234},
{year: 2016, rows: 'sponsorship', value: 7890},
etc
]
Drat! I feared an answer like this....
But thanks for your immediate response and of course your phantastic library (already using it in the "right way" :-)! HG
Hi! I'm wondering how I could get the following type of pivot-table:
My data is (actually) an array of objects with - amongst many others - 5 "interesting" keys with number values each, e. g.:
I would like to summarize all the project cost values over the respective years in one row, all sponsorship values in the 2nd row and so on:
Do I have to write my own aggregator or am I only too blind to see the OOTB-solution? Or has anyone solved this already? What I would like to avoid is running an additional query (actuallay don't have an idea how this has to look like) against my database because it would result in transferring much more IMO unneccesary data, as I have to transfer the a.m. structure anyway.
Thanks in advance! Hans-Gerhard