Find a way to get combined results starting with a base search like this:
(index=o365 tag=email SenderAddress=*@mycompany.com RecipientAddress!=*@mycompany.com) OR (index=beta sourcetype="activities") | ...
Then wrap it up as shown in this stand-alone demo here:
|makeresults | eval _raw="SenderAddress=john@mycompany.com,FullName=John Doe,JobTitle=Clerk,ManagerNameJoe Bloggs,Location=London,JobLevel=3,Recipients=email@email.com,Subject=Re:Confidential,NameInSubject=John_Doe,num_days=3"
| append [|makeresults | eval _raw="DisplayName=John Doe,EmailAddress=john@mycompany.com,Mobile=+444444444444,JobTitle=Clerk,BusinessUnit=Sales,Department=North,JobLevel=3,Number_of_Transfered_Files=56000" ]
| kv
| eval JOINER = coalesce(EmailAddress, SenderAddress)
| stats values(*) AS * BY JOINER
... View more