I have a filter on Print Composer that selects "id_mov" and shows figures one by one into the map. This "id_mov" is not unique so different id can have the same "id_mov". Qgis select distinct by default and for the same "id_mov" I can't find the way to show them all together in the same map composition. It could be like saying in SQL "no select distinct"


I studied your questions, because sometimes I need it..

My suggestion is depends of your format:

Case A: Shapefile Create a new shapefile using "Dissolve" Tool

Case B: PostGIS: Create a View using "Group by"

  • Dissolve seems clear but the view doesn't. How can I keep several figures with their own geometry in a single line? Group by results diferent id for every single geometry, am I right? Then I don't get the point for creating a view. Thnks ;) – Coldon May 3 '16 at 11:53
  • 1
    You must to create a view like this exemple:create view my_view as select st_union(the_geom) as the_geom, sum(area_ha) as area_ha, id from my_table group by id – Carlos López Quintanilla May 3 '16 at 12:07
  • 1
    I didn't know st_union function. This works!!! Big Thnks! – Coldon May 6 '16 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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