Author Topic: Grouping feature with custom subtotal  (Read 2728 times)

youngvan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 42
    • View Profile
Grouping feature with custom subtotal
« on: June 27, 2016, 04:39:39 pm »
I have a table with already calculated subtotals, which are not simple min/max/sum/avg function, but very complicated formula and can be calculated only from raw data. You can see example in attachment.

I want to use grouping feature, but when rows collapsed, i need to show pre-calculated subtotals.

It would be perfect, if it's can hide all lines except subtotal line, like excel doing, when group collapsed.

Is it possible to do with your library? If not - can you add such ability in next version?

youngvan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Grouping feature with custom subtotal
« Reply #1 on: June 27, 2016, 04:46:23 pm »
And in addition it would be great if i can set row numbers to be collapsed, instead than detecting it from columns data

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Grouping feature with custom subtotal
« Reply #2 on: June 27, 2016, 11:44:11 pm »
Quote
I have a table with already calculated subtotals, which are not simple min/max/sum/avg function, but very complicated formula and can be calculated only from raw data. You can see example in attachment.

Please mention the complication of formulas. If they are dependent upon data in same column, then they can be added by adding custom methods in pq.aggregate, if they are dependent upon data in same rows, then column.formula() callback can be used.

Quote
I want to use grouping feature, but when rows collapsed, i need to show pre-calculated subtotals.
It would be perfect, if it's can hide all lines except subtotal line, like excel doing, when group collapsed.

Yes it's there, please see the demos.