Splunk Search

I have 4 columns with 1 data in each, I wrote this query with the help of AppendCols and populate my results, please check below for more details.

krsuraj11
New Member

I have 4 columns with 1 data in each, I wrote this query with the help of AppendCols and populate my results, now I want to produce a Pie Chart, but Pie Chart is not populating correctly and Only one data displaying in the Pie (which is the first column), please help populating my result in Pie chart with all the four column.

0 Karma

vnravikumar
Champion

Hi

Please post your query.

0 Karma

niketn
Legend

@krsuraj11 Also post some sample data. With your current query what is the output you are having? You may want append instead of appendcols (subsearch may not be required at all, however, community would be able to assist you better only if you provide your current query and sample data).

If you just want to be done with your use case, you can pipe a transpose command at the end of your current query and you should be able to see pie chart. Please try out and confirm (however, this may not be the most optimized way of writing SPL).

<yourCurrentSearch>
|  transpose

Following is a run anywhere example to transform columns to rows using transpose which ca:

|  makeresults
|  fields - _time
|  eval data1=20,data2=10,data3=30,data4=22,data5=11,data6=50
|  transpose column_name=myFieldName
|  rename "row 1" as myCountField
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...