Table visualization: group rows

This feature was requested in this thread: Is it possible to hide common rows under a spoiler?

There are two ideas how it could be implemented:

1. Group rows by single or multiple fields (similar to SQL’s GROUP BY). Demo

Pros: easier for use (no need to prepare data in special way like in variant 2).
Cons: less flexibility comparing to variant 2.

2. Classic item ID - parent ID relation. Demo

Pros: very flexible.
Cons: user will need to prepare data to reflect relations between records. But since it’s quite common pattern of storing hierarchies in database - the data may be already in right format.

Also, we could implement both variants and add a setting to choose right one.

I think variant one is more intuitive and easier to produce in a query. But I’m not sure if this will be “complete” without some ability to apply an aggregation on the non grouped columns.

2 Likes

@levko, great, thanks!
It would also be good to count statistics (amount, average, etc.) per column that can be aggregated. To see, for example, that the sum is in the group fork 256 and the sum in the group fork/dashboard 72.
Perhaps that’s what @arikfr says.

1 Like