I have a suspicion that you misspelled either account_id or aws_account_id in the macro because the way you presented, the resultant subsearch is NOT (). Are you sure you copied the above search verbatim into index search and you get the correct result that is NOT the same as using the macro? Further, which fieldname exists in actual data? aws_account_id or account_id? For example, if account_id exists AND if you intend to match account_id in index data with "Account ID" in the lookup, your macro should be something like search [inputlookup Account_Owners.csv |rename "Account ID" as account_id |search Environment IN (PROD, UAT, ) |table account_id] Hope this helps.
... View more