Splunk Search

How do I group 2 attributes for line graph Splunk

Rayzer
Engager

I'm trying to do a line graph using this command:

source="filename.csv" sourcetype="csv" | stats sum(intake), values(gender) by academic_year

Output:

Rayzer_0-1642263301401.png

 

However, I want the total intake to show the total for each gender, male and female so that my line graph will look something like this: 

Rayzer_1-1642263427021.png

 

Thank you for the help!

 

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Change stats to chart

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
source="filename.csv" sourcetype="csv" | stats sum(intake) by academic_year, gender
0 Karma

Rayzer
Engager

This works only in the visualization tab, but my line graph still does not look like the drawing above.

Rayzer_0-1642300830931.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Change stats to chart

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...