Splunk Search

Want to split results based on a field value

leandrot
Explorer

Hi all,

We have a field which represets de Offices, and we would like to make 2 different line charts separating between Domestic offices and International offices.

As Example we have:

Domestic offices: PHX, LAX, LGA
International offices: BUE, LIM, MEX

How can we filter the results to dispaly on each graphic the corresponding offices ?

Thanks in advance

Tags (1)
0 Karma

TISKAR
Builder

@leandrot , Can you try this please:

<yourSearch> |eval TypeOffice=if(Offices="PHX" OR Offices="LAX" OR Offices="LGA","Domestic offices","International offices") | chart count over Offices by TypeOffice
0 Karma
Get Updates on the Splunk Community!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...