I have a shapefile which is a district map. There are close to 800 districts. There are around 30 funding agencies. There are four different health programs. The different funding agencies fund specific amounts for different programs in different districts. I have an Excel sheet which has this four column information vs. District name, Funding Agency, Program name and the fund given.

I want to display this on a shapefile, this is available and I am able to display the shapefile with district separations. How do I use this data and pose specific queries like which funding agency has provided in which districts and any such different combinations?

This may be construed as an SQL query and any responses should be made use for displaying on top of the district map regions or to show as a pop up window. To display with different shaded regions on the map is better.

  1. Do I have to use a separate database for exporting this kind of data or QGIS has its own database where I can export this file and start using data from it?
  2. How can we compose the SQL query for the different queries that may be posed?
  3. How do I display this resultant query on top of the shapefile or display as pop up on top of the shapefile? Can this be called as Metadata?

Can someone help me on this lengthy question and not sure if this is a trivial requirement someone has already implemented on QGIS.

1 Answer 1


Use the join functionality in QGIS. A precondition to do this is that you have shared keys (name/code) across the layers you are joining.

Add your external excel-file by dragging and dropping it in the layer overview. Open layer properties for your spatial layer by right-clicking and select the join. Select join over the shared columns - in your case district names or codes. Experiment a bit and you will get it right :-)

enter image description here

Your Answer

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

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