Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I join a layer with another layer all the attributes are correctly displayed in the first layer. However when I use the Query builder (Layer - Query) and then use Zoom to layer, nothing is displayed.

sgrieve - thank you for you guys taking the time to help us newbies.I have added a vector layer with attribute values from Excel and joined it with another layer consisting of polygons. The polygon layer then displays all the attributes in its table from the Excel imported layer. When I want to view only selected polygons using the Layer > Query using the joined attribute values and use Zoom to Extent nothing happens.

brydypus. Thanx. Rule-based styling seems to be the answer.

share|improve this question
Welcome to the site! The more detail you provide the better an answer you can expect to receive. Can you tell us some more about the data you are using, what you are trying to achieve and what you have done so far? – sgrieve Oct 15 '12 at 10:27

As far as I know Query Builder is not supported yet for layers with joins, at least not on QGIS 1.8 on MacOS.

Query Builder button in Layer Properties > General window is disabled and Query item in right click menu on layer is not shown.

All you can do is use rule-based styling for showing/hiding elements on the layer with joins (Layer Properties > Style).

If you want to perform dynamic selections and zooming you can use the Advanced search in the attribute table view (right click on layer > Open Attribute Table; in the right bottom part of the window you'll find Advanced search button). This will permit you to select features using SQL on all layer's fields, and you'll be able to zoom to selected features.

Anyway, I agree with you: query builder on joined layers would be a useful improvement!

share|improve this answer

I know this is an old thread but I came across it when I was searching for the answer to the same question. The answers led me to discover that if you do the Query Builder BEFORE you do the join, it will still work.

The version that I am using is 2.8.1, however, so I don't know if this would work in older versions.

As PieterB said, you can use the "Save As..." on the joined layer then do the query on that new data. For my situation, that original shp will change often but the joined data will not. This would create several shapefiles that are not needed.

share|improve this answer
Note that 2.10 fixes this issue… – underdark Jun 24 '15 at 20:22

Save your joined shapefile as a new shapefile: Layer > Save as.
You wil see in the attributetable that the excelcolumns are 'incorporated' in the new shapefile. Now you can do the query as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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