[Qgis-user] Coding in the field calculator - how to ask for value one line above

Bernhard Ströbl bernhard.stroebl at jena.de
Thu Nov 6 03:33:38 PST 2014


Hi,

not that I am aware of BECAUSE: the order of rows in a table is random 
and being manipulatible through the user (sort, filter).
A script could easily step through the table and keep one row's Y value 
in a variable until the next row's X value is determined BUT I doubt 
that the output of this script would be reproducible, so unless you 
explain better what you are aiming at doing your wish seems nonsense to me.

Bernhard

Am 06.11.2014 12:15, schrieb Florian Konrad:
> Hi there,
> i got an attribute-table with thousands of lines and several columns. I want to check every Line if the value in column „X" is „a“ and if the value in column „Y“ but one line above is „b“ at the same time. So i want to write something like this in the field calculator to generate a new column:
>
> CASE WHEN „X" = ‚a' AND "the value one row above in column Y" = ‚b' THEN '1‘ END
>
> so that i can mark these lines that im searching for with ‚1‘ in a new column… Is there a command for "the value one row above in coloum Y“ ? Or do i have to do this some other way?
> I hope i explained my problem well enough and would appreciate any help.
>
> Greetings
> Florian
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> __________ Information from ESET Mail Security, version of virus signature database 10679 (20141106) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>



__________ Information from ESET Mail Security, version of virus signature database 10679 (20141106) __________

The message was checked by ESET Mail Security.
http://www.eset.com





More information about the Qgis-user mailing list