Reporting

Data with multiple occurences

aquinojason
Path Finder

Hi,

We have the following source tables (2 sourcetypes):

1st table:

ACCOUNT_CODEApplicationBusiness UnitApplication RTO
AD30OH00Accounts Reconciliation Control SystemIndividual Life InsuranceC - Greater than 4 hours and less than or equal to 24 hours
ADR3OH00Accounts Reconciliation Control SystemIndividual Life InsuranceC - Greater than 4 hours and less than or equal to 24 hours
AJ52OH00Accounts Reconciliation Control SystemIndividual Life InsuranceC - Greater than 4 hours and less than or equal to 24 hours
AN00OH00Accounts Reconciliation Control SystemIndividual Life InsuranceC - Greater than 4 hours and less than or equal to 24 hours
AN0WOH00Accounts Reconciliation Control SystemIndividual Life InsuranceC - Greater than 4 hours and less than or equal to 24 hours

 

2nd Table:

DATEMVS_SYSTEM_IDACCOUNT_CODECALCMIPS
1/1/2020SYST1AD18IEDA1.31
1/1/2020SYST2AD18IE002.11

 

We wanted to create a table where we can show the SUM or AVG CALCMIPS per Application Name based on month. However, the ACCOUNT_CODE can be used by Multiple Application so it needs to be calculated within all those occurrences. Can you help us on how we can achieve it?

Table will look something like:

Application NameBusiness UnitApplication RTOJanuary Avg. MIPS
Accounts Reconciliation Control SystemIndividual Life InsuranceC - Greater than 4 hours and less than or equal to 24 hours0.0472767857142857

 

Thanks and Regards,

 

Labels (1)
0 Karma

aquinojason
Path Finder

I will test this out. Thank you very much!

Yes, the ACCOUNT_CODE does exist in both source types. It's just that it can used my multiple Business Unit and should be summed up or included in the average of the Business Units that use that particular ACCOUNT_CODE.

0 Karma

manjunathmeti
Champion

Assuming both source types contain the same ACCOUNT_CODE values. 

index=index sourcetype=sourcetype1 
| append [ search index=index sourcetype=sourcetype2 
| eval DATE =strftime(strptime(DATE, "%m/%d/%Y", "%b_%Y"))] 
| eventstats max(Application) AS Application, max("Business Unit") AS "Business Unit", max("Application RTO") AS "Application RTO" by ACCOUNT_CODE 
| search sourcetype!=sourcetype1 
| stats avg(CALCMIPS) as avg_CALCMIPS, values("Business Unit") AS "Business Unit", values("Application RTO") AS "Application RTO" by DATE, Application 

 

If this reply helps you, an upvote/like would be appreciated.

0 Karma
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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...