Filtering out GLAccount numbers

Got an odd one here, I was asked to create a couple of BAQ’s that would show nominal codes of Line postings for Invoices both Customer and Vendor.

I managed to create these but was then asked to filter out a few GLAccounts from the results and that is where I ran into a snag.

If I do the normal thing i.e. add criteria to show Not GLAccount = 123456 or whatever, it doesn’t work. As I then realised this field is a complex delimited field and I only want the first 6 digits I tried “Begins”, “Matches”, “Contains” etc but it wouldn’t work.

So I then tried filtering on SegValue1 which appears to show just the part of the GLAccount I actually want i.e. a 6 digit number but the lines are still there in the results.

Co-pilot suggested a few things such as a calculated field but I feel I would rather ask on here what others may have done when faced with a similar issue?

Maybe a subquery?

cheers.

Might have got it working with a subquery on SegValue1

Edit: Yes, that has worked.