Data Table with Document Status Counts by Month

Hi all,

I am new to Kibana and am having trouble creating a desired data table.

In short, I have an index comprising documents representing order lifecycle, similar to the image shown below:

The order documents include key-value pairs, where the key is the name of a particular order lifecycle status (e.g., "shippedFromCustomer", "ReceivedAtWarehouse", etc.) and the value is a unix timestamp when the order lifecycle status occurred.

In the data table, I would like to break the order lifecycle statuses down into respective rows, and have the columns sum the totality of order lifecycle status occurrences in a particular month. The image below shows the desired table.

Ultimately I am open to any and all suggestions, even reshaping the documents.

Thanks in advance and preemptive apologies if this is a silly question or doesn't abide by forum norms.

Really would appreciate any help here, even if it's to say this isn't possible or my question is dumb :laughing:

It's a bit complicated to do in Kibana with how your data is structured (I think it can be done in Kibana Canvas using ESSQL, but I am no expert on that).
If you can change the data to be like this:
{
"id": ""
"action": "shippedFromCustomer"
"timestamp": 1612204599000
}

{
"id": ""
"action": "receivedAtWarehouse"
"timestamp": 1612554599000
}

And so on.

Then you do a simple Terms aggregation by the Action field and a Date histogram to split it by month.
The way your data is structured already is pretty much aggregated already and what ES and Kibana do is aggregate data themselves, so you can see why it's difficult to fit already aggregated data.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.