I have a QGIS Geopackage for a layer and I want to update the "Coverage" column based on the contents of the "ID_1" column. In the example below, the ID_1 column contains 1,2,3 or 4 separate entities (each starting with "E" and separated by "|"). I'd like the Coverage column to represent that number, e.g. 1,1,2,1,2,3 for the first few rows.
In Excel I would just count the number of "E" in the column. How can I do that in QGIS, I have tried 'count' in the field calculator, but for every row, I get to total number of rows in the whole ID_1 column, not the number of E in each row.
The other option would be to paste the column from my Excel into the coverage column in QGIS, but I can't select a whole column in the QGIS Table - is that possible? This layer contains geometry so exporting it as a csv and then reimporting it won't work (I assume).
count()
. Also, you assumption is wrong.