Sum of a value in a log string

Comments

2 comments

  • Avatar
    Kevin Keech

    Hi Jordi,

    Does the following get you the result you want?


    | parse "(amount=*," as amount
    | sum(amount) as total
    0
    Comment actions Permalink
  • Avatar
    Jordi Hoock

    Yeah that worked well, thank you very much. I have another question though 

     

    is it possible to group by the total by 'currency' ? 

     

    imagine that there are two more logs and the currency is EUR (in these logs are USD) and I wanna show different two logs 

    sum of amount in USD

    sum of amount in EUR

     

    Thank you 

    0
    Comment actions Permalink

Please sign in to leave a comment.