Splunk Search

How to add new row in table on runtime

Path Finder

Hi,

i have data :

    host       max(Power_consumption)
1   ABC         150
2   XYZ         135

I want to add 150+135=285 and display it in next row and total.

    host        max(Power_consumption)
1   ABC         150
2   XYZ         135
    Total        285
Tags (1)
0 Karma

Motivator

Did you try "| addtotals fieldname=Total max(Power_consumption)"?

Motivator

if your field to do total is max(Power_consumption) just add it after it,and you can use several fields and wildcard too.
I modified my initial answer

0 Karma

Path Finder

addtotal will add all Power_consumption values from entire log. I need to add only maximum power consumption values

0 Karma