Aggregating logs label's values in one line

Hi

I’m trying to create a table with an aggregation of values in the same field but without any calculation function.

I have a Loki LogQL query that transforms to a table with three labels. I want to do a “group by” with two of the labels, and the third one will be aggregated to have all the values in the same line together. For example:

The logs line from the query are:

Apple Buy 20
Apple Buy 20
Apple Sell 45
Apple Sell 45
Banana Buy 30
Banana Buy 30
Banana Buy 20
Banana Buy 20
Banana Sell 45
Banana Sell 45

And after transformations (Labels to fields, Filter by name, Group by - on all three labels, Organize fields), the table looks like this:

And I want it to become like this:

So for Type Banana with Process Buy, all the values are aggregated together like in a list or vector (We can have the values ordered but it’s not necessary, the Value is a string of a number).

I have been trying to do the change between the first table to the second and have encountered difficulties completing this change.

Any help would be very appreciated.

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