<div dir="ltr"><div><div><div>Hi,<br></div>unless the number of combinations is known and limited, using case when function could become a nightmare.<br></div><br>QGIS 2.16 provides aggregates functions (<a href="http://qgis.org/fr/site/forusers/visualchangelog216/index.html#feature-aggregate-support-for-expressions">http://qgis.org/fr/site/forusers/visualchangelog216/index.html#feature-aggregate-support-for-expressions</a>) that I think would help to do this but I'm unable to find the right syntax, if ever.<br><br></div><div>Regards,<br></div><div>Harrissou<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-14 14:07 GMT+02:00 Christine <span dir="ltr"><<a href="mailto:geo.guide@web.de" target="_blank">geo.guide@web.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Salvatore Oliveto wrote<br>
<span class="">> Hi, I have a Qgis layer with a table with twno columns X and Y.<br>
> The X column has a set of values​​, while in the Y column I have to enter,<br>
> using field calculator, for each record the progressive value. Eg : X<br>
> column values: a , b , c , d ; Y column values (to be calculated with the<br>
> field calculator from Y column): a; a + b; a + b + c; a + b + c + d.<br>
<br>
</span>Hi Salvatore,<br>
not really sure, if I understood you properly, but you can use a "case when<br>
... then ... else" condition in field calculator. Please adapt the following<br>
pattern to your needs:<br>
<br>
CASE<br>
WHEN X = a THEN a<br>
WHEN X = b THEN a+b<br>
WHEN X = c THEN a+b+c<br>
WHEN X = d THEN a+b+c+d<br>
ELSE 'error value'<br>
END<br>
<br>
Hope this helps,<br>
regards, Christine<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/calculating-progressive-value-tp5280693p5280699.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/calculating-<wbr>progressive-value-<wbr>tp5280693p5280699.html</a><br>
Sent from the Quantum GIS - User mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a></blockquote></div><br></div>