Hello folks,
I have a stats result with two columns:
Column A - only one result in the first line
Column B - 8 lines of different values
I'd like to iterate the value in Column A through all the values in Column B, doing a eval division, that would be returned in a third column.
For example: columnA.firstline/columnB.firstline, columnA.secondline/columnB.firstline, ...
Is it possible?
Thanks in advance!
If the column isnt multivalues, you can use streamstats to capture what the first value of the column is and use it to calculate the new column.
... | streamstats first(columnA) as div | eval result=columnB/div | table columnA, ColumnB,result
I am guessing ColumnB is a multivalued field (output of aggregation commands like values/list). Here is what you can try
your base search giving single valued field ColumnA and multivalued field ColumnB | eval ColumnB_Orig=ColumnB| mvexpand ColumnB | eval ColumnC=round(ColumnA/ColumnB,2) | rename ColumnB_Orig as ColumnB| table ColumnA, ColumnB, ColumnC