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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...