I was wondering about the cleanness of the mockup and the use of values(PayAmt), etc. If there are multiple transaction from the same account but no transaction ID AND _time is not a reliable determinant, life can be really tough. (My explanation of the cleanness to myself was that maybe you were working with one of those medical labs that used a unique account for every transaction.) In essence, the challenge is semantic because there is no clear definition of a "match". I am not sure how much streamstats can help until defined "match" criteria emerge. Anyway, if there is anyway to define a unique "primary key" with a group of variables, you can use them in groupby. For example, suppose status "Success" in "A" search matches that of "True" in "M" search, "A" Category matches "M" Source, and the payment amount can be used for matching. Instead of naming these matching fields differently, they should have identical names and matching values should be equal so groupby can do its magic, like index="index1" Tag="Tag1"
| rename AccountId as AccountNumber
| rename PaymentChannel as A_PaymentChannel
| eval PaymentAmount = round(PaymentAmount, 2)
| rename StartDT as Time
| table PaymentAmount A_PaymentChannel,AccountNumber,PaymentCategory,ResponseStatus, Time, index
| append
[search index="index2" sourcetype="source2"
| eval PaymentAmount = round(PaymentAmount,2)
| rex field=source "M_(?<M_Source>\w+)_data.csv"
| eval PaymentCategory = if(M_Source == "card", "Credit", "Cash")
| eval ResponseStatus = if(ResponseStatus == "True", "Success", "Failure")
| rename "TERMINAL ID" as M_KioskID
| rename "KIOSK REPORT TIME" as Time
| eval _time =strptime(Time,"%Y-%m-%d %H:%M:%S.%3Q")
| addinfo
| where _time>=info_min_time AND (_time<=info_max_time OR info_max_time="+Infinity")
| table PaymentAmount AccountNumber, PaymentCategory, M_KioskID,ResponseStatus, Time, index]
| stats values(*) as * by AccountNumber PaymentCategory ResponseStatus
| table AccountNumber,A_PaymentChannel,M_KioskID,PaymentCategory,PaymentAmount,ResponseStatus,Time
| eval PaymentAmount = case(mvcount(index)==2, "$", index=="index1", "A$", index=="index2", "M$") + PaymentAmount
| sort - Time
... View more