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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...