How to help you, if you don’t really show your setup, or describe it in detail ?
-did you use a dataset ?
but my dataset filter is only returning 17
Seems like you did!
Did you setted-up something inside the property-panel ? (options of dataset?)
Surely you did!
Did you use CODE ?
If so —> WHERE IS YOUR USED OCDE ?
You will get the same quality output, as inserted input.
Bad INPUT = bad OUTPUT.
Anybody can see what exactly you have done (setted-up) inside your project!