Dashboards & Visualizations

adding two columns and plot timechart

mrigendra
New Member

Hi, I want to plot sum of two columns and plot it as timechart. Here is what I am doing,

source="2weeks.csv" | timechart eval(sum(FemaleGTotal) + sum(MaleGTotal))

This doesn't seems to work, where as both the following queries run fine.

source="2weeks.csv" | timechart sum(FemaleGTotal)

source="2weeks.csv" | timechart sum(MaleGTotal)
Tags (1)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

Use:

... | timechart sum(F) as sumf, sum(M) as summ | eval t=sumf+summ

Unless you're looking for:

... | timechart sum( eval(F + M) ) as t

Which differs in how null values are handled.

View solution in original post

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

Use:

... | timechart sum(F) as sumf, sum(M) as summ | eval t=sumf+summ

Unless you're looking for:

... | timechart sum( eval(F + M) ) as t

Which differs in how null values are handled.

0 Karma

mrigendra
New Member

@gkanapathy: thanks, both queries are helpful to me. But what you mean, when you say that they differ in how null values are handled?

0 Karma
Get Updates on the Splunk Community!

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...