Let's start with the second question. :)
Query fields are fields you can set to indicate the data you want returned - it is like saying "I want all rows where customer name is Bob". You set query fields prior to executing a query.
So - you would never use query when choosing fields for filtering. Only the data fields.
I think the issue you are having is the two separate conditions. InfoPath is checking for the PartNumber = field1 and then in your second condition, just looking at the very first instance of SNNeeded.
I would use the following:
1st Condition: field1 is not blank and
2nd Condition: field1 is equal to - then use a formula
For the formula, select PartNumber in your secondary data source (2ds) - when you select it, you'll see a Filter button. Click that. For the filter, select SNNeeded (2ds) is equal to "yes".
I *think* this will do it - but if it doesn't work post back and attach your form under the Options tab and I'll help you out.