Filter last result in Kibana table

I have the following data:

image

With "Top Hit" aggregations I can get the latest result of each event:

image

How can I filter Data Table results to get events with the last result is "failed"?

Samples under the spoiler

This is right: :slightly_smiling_face:

This is wrong: :frowning_face: