Search code examples
splunksplunk-query

How to remove a certain field from Splunk output


I am trying to remove a field from Search Result after running a command in Search Head on Splunk.

enter image description here

However as you can see in the following command that I am trying to run I see following error. I am quite new to Splunk and not sure what I need to do. Please guide.

enter image description here


Solution

  • I would suggest you to specify what you want as a result. The table command should help you :

    xxxxxxxxxxxxxxxxxx |top DEPARTMENT | table DEPARTMENT,count
    

    This way, you should only have the DEPARTMENT and count columns.