Splunk Search

Get multiple Fields in chart function

sumarri
Path Finder

So, I have a chart function that works perfectly!

| chart sum(transactionMade) over USERNUMBER by POSTDATE

But, I want my chart to have USERNUMBER and USERNAME. They are both correlated, so it should not be an issue. I also want to add Team Number, which there is no correlation to USERNUMBER and USERNAME.

Is it possible to have multiple fields after over?


I can concatenate all the fields into one string, but it would be easier if they were separate columns.

Thank you! 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Further to @gcusello 's response, the chart command has only three dimensions, the over field, the by field and the aggregation function. Although, strictly speaking, this can be extended by multiple aggregation functions, but you end up with composite column names.

As already suggested, concatenating fields is one way to get around this. Another way is perhaps more tricky and involves using the stats command instead and then messing around with the fields to get the by field values represented as field/column names.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sumarri,

for my knowledge, the only way is concatenating the fields in one field and use it for the chart command.

Ciao.

Giuseppe

sumarri
Path Finder

Okay, that is what I thought. 

 

Thank you so much for conforming! 😊

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

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 ...