fbaligand / kibana-enhanced-table

Kibana visualization like a Data Table, but with enhanced features like computed columns, filter bar, and “Split Cols” bucket
Apache License 2.0
305 stars 65 forks source link

Question: How to show row total over split column #278

Closed hoberhol closed 1 year ago

hoberhol commented 1 year ago

Hi all

I'm facing quite often the problem, that I would like to show the row total over the currently displayed split columns .

The following example is showing some values for some employees for some months (split columns). I would like to also show a total for each employee (yellow).

enhancedTableIssue

Does anyone can help me with this? Seems to be quite an easy task, but so far I was not able to find the solution.

Thanks a lot.

fbaligand commented 1 year ago

Hi,

To do that, you add a "computed column", and in "Formula", you put sumSplitCols()

You can view all available methods in "Formula" here: https://github.com/fbaligand/kibana-enhanced-table/#available-functions

hoberhol commented 1 year ago

Hi,

Thanks a lot for your support. With your proposed solution I'm able to achieve a total over split column like this:

image

Unfortunately, I'm no longer able to format the cells, as I cannot used computed columns for the split columns and a total computed column the same time...or this it at least what I found out.

image

In order to use computed columns in the split columns I need to enable the option "Computed/Hidden cols per split col". That way the computed column for the total is now also calculated for each month and no longer as a total of all months.

image

image

I've tried to use "Custom column position = 1" for the total computed columns. But this is getting some strange result:

image

Do you have a solution for this? Or is it just not possible? As I'm using quite often the split column feature and almost always a total would be important, a solution to this would help me a lot. It is also always necessary to format the columns (number format, color, formula), therefore I need to be able to use the computed column for the split columns.

Thanks a lot for your support.

fbaligand commented 1 year ago

Hi, Unfortunately, it is not possible to have both "computed columns per split col" and "computed columns for all cols". There is a feature request for this: https://github.com/fbaligand/kibana-enhanced-table/issues/54 You can "+1" it to give it more priority.

That said, given your specific use case, maybe you could try with this setting enabled: "Show metrics for every bucket/level". It should add "total" column.

fbaligand commented 1 year ago

As question is answered, I close the issue.