To be specific, I have a shapefile on census block groups (CBGs) in Georgia, but I only want to use those in Atlanta's commuting zone (CZ).

However, commuting zone is not a field in the census shapefile, so I join the layer with a different table that links CBG IDs to CZs. If I want to filter this layer, I am prompted to define a virtual layer, which I duly do.

Yet when I save that virtual layer (showing all the original fields, and CZ, and only for CZ=141, which is Atlanta) the shapefile is empty, thus the geography is lost somewhere along the line.

What is the proper way to do this?

I am on QGIS 2.18.2.

1 Answer 1


Instead of filtering the layer, make a Select By Attributes query, and when you go save it, mark the box that reads "Save only selected features".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.