Reporting

Treat two values as the same

user93
Communicator

Hi,

I have a scenario that is rare for me and I need help.

I have had an object receive a change to its ID value, so now it has two IDs that mean the same object. Before, I made a report just including both IDs, but now I need to deliver a report that includes other related objects with their IDs.

I want to combine the IDs so they appear as a single combined column in the table delivered with the report.

productID=abc or
productID=def or
productID=ghi OR
productID=jkl OR
productID=mno
|chart dc(person) over company by productionID

Table:

company abc , def , ghi , jkl , mno

comp1 1 3 0 5 1
comp2 2 4 0 0 0
comp3 0 0 0 0 1
comp4 4 0 0 0 1

I want the output of my table to combine productID, ghi and jkl, so that they only have one productId and it still counts the others individually.

This is the only case I do this, so I don't need a complicated lookup, I just need it to work for this one table this one time.

Labels (1)
Tags (1)
0 Karma
1 Solution

jpolvino
Builder

So if you want to combine productID ghi and jkl together as one, and treat the others individually, try this:

(your search)
| eval prodType=if(productID=="ghi" OR productID=="jkl","combined",productID)
| chart dc(person) AS dcPersonCount over company by prodType
| xyseries company,prodType,dcPersonCount

View solution in original post

jpolvino
Builder

So if you want to combine productID ghi and jkl together as one, and treat the others individually, try this:

(your search)
| eval prodType=if(productID=="ghi" OR productID=="jkl","combined",productID)
| chart dc(person) AS dcPersonCount over company by prodType
| xyseries company,prodType,dcPersonCount
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!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...