2

I need to know how I can select/aggregate equal attributes in a table.

This is quite the same I want to do. But I want to do it with the modeler. How to group and count attribute data?

The column "Number" has attributes like 1.1 or 1.3 or 4.3. There are a lot of 1.1 or 1.3....in the column. In step1 I want to find all the 1.1 or 1.3 ...for calculating later the weighted average of a value by using the area. The problem is that the "Numbers" are different in all my tables. In EXCEL I could use a data filter to select all the equal attributes. Its not easy to describe...sorry. To say it in one sentence: If „Numbers“ are equal than calculate the weighted average of the Values and create a new table

screenshot_explanation

But hopefully the screenshot describes the problem better than my words.

1

For step 1, use Select features using an expression. Open the attribute table by right-clicking on the layer in the TOC. Look for the button with a curly 'E' on a yellow square. With the Select features using an expression dialog open you can then build an expression by selecting fields, operators, conditionals etc from the function list. You can then use the Basic Statistics tool (in Vector->Analysis Tools) on your selection or you can compute the weighted average or use the Statistics by Categories tool (in Processing->Vector table tools). I think this second option will possibly be closest to what you want.

If the statistics are too limited within these tools, you could always save the Attribute data to a CSV (right-click layer and save as). Then open the csv in Excel, do you calculation and create a table of just the statistics by "Numbers" and then join that table to your data.

  • The problem is that I need to now how I can select equal Numbers. Is it the CASE-String I have to use or LIKE/ILIKE? – Pimpel Mar 7 '14 at 10:52

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.