I got a search result as below.
ClientType count
SI 130
Competotor1 115
Partner 70
Competotor2 20
However, I like to change the result, as sum of the count values of Competotor1 and Competotor2 is Competotor_total and delete the values of Competotor1 and Competotor2.
The changed result will be
ClientType count
Competotor_Total 135
SI 130
Partner 70
Could anyone help me how to do that?
Best Regards.
Try this
| eval new_ClientType =if(ClientType LIKE "%Comp%", "Competotor_Total",ClientType ) | stats sum(count) by new_ClientType
Try this
| eval new_ClientType =if(ClientType LIKE "%Comp%", "Competotor_Total",ClientType ) | stats sum(count) by new_ClientType
Thanks to you, I could understand 'eval if' function.
Thanks a lot.
But how did you add two functions?