How can I create an User Filter to filter the records of a record type by the last event type associated with them

Certified Associate Developer

I've got this 'Expense' record type, and I've set up two event tables for it — 'Expense Event History' and 'Expense Event Type'.

Now, I'm looking to make a user filter within the 'Expense' record type.

I want the filter options to be based on the 'Expense Event Type', so when I pick one, only expenses with that event type as their latest event will be shown.

The issue arises when selecting event type 'Pending'. Due to the 1-N relationship, the a!queryFilter exhibits an 'At least one' filter behavior. 
https://docs.appian.com/suite/help/24.1/fnc_system_a_queryfilter.html#%22at-least-one%22-filter-behavior

Consequently, the list displays expenses with their latest event being event type 'Pending' (first row on the image), but it also includes expenses that have ever had events with event type 'Pending' (second row on the image). 

Could you suggest a workaround or alternative approach to achieve what I want?

  Discussion posts and replies are publicly visible