Nested Group-by in data table

Hello,

I am trying to build a report layout that has more than one level of group nesting. This is a familiar report style with a top-level group label, then the next level grouping label, and then items listed under that.

Concretely, given data like this:

operation, object, day-of-week
buy, cheese, tuesday
sell, chips, thursday
buy, burrito, monday
buy, burrito, tuesday
cook, pasta, tuesday
cook, burrito, tuesday
sell, cheese, monday
buy, cheese, monday
sell, pasta, monday

I would like to see a formatted, nested report like this:

monday
    sell
       pasta
       burrito
       cheese
    buy
       burrito
       cheese
tuesday
    cook
        burrito
        pasta
    buy
        cheese
       burrito
   grate
       cheese
thursday
    sell
        chips

But not:

*monday*
    sell pasta
    sell burrito
    sell cheese
    buy burrito
    buy cheese
*tuesday*
    etc. 

The ultimate goal is to produce a nice, human-friendly printed PDF with fewer rows with repeated values.

Doing a row-split on terms lumps the data correctly, but I don't see how to display a list of rows under each group heading, possibly nested. I.e., I can send the result of my elastic query with repeated values in rows to "report generator" software and specify what columns I want to group by and it will list the rows in each sub group.

Thank you!

- scott r

(edit) PS: I'm using hosted Elastic from Elastic.co if that's relevant

Unfortunately this is not something that is possible right now in Kibana. The closest issue I know of that tracks this is the request to support pivot tables, but I think this is actually a separate concept.

The closest issue I know of is actually one that I opened in EUI, but I think I will open a Kibana issue for this: https://github.com/elastic/eui/issues/2705

I've written up this feature in the context of Lens, which I work on: https://github.com/elastic/kibana/issues/61470

1 Like