[QGIS-Developer] Please help! - QGIS expressions don't evaluate as expected

Siki Zoltan siki at agt.bme.hu
Sun Aug 12 23:32:29 PDT 2018

Dear Evan,

try to send your question to the https://gis.stackexchange.com/,
it is for GIS questions.


On Sun, 12 Aug 2018, Evan Kanter wrote:

> Hi Devs,
> I˙˙m sending you a link to my post on Stack Overlow, requesting assistance!
> https://stackoverflow.com/questions/51812251/qgis-expressions-dont-evaluate-as-expected
> I would really appreciate your help. I am pasting the content of my post on stack overflow below for your convenience.
> Evan Kanter
> evankanter28 at gmail.com
> I am using QGIS with a vector layer and the attribute table stored at this link:https://docs.google.com/spreadsheets/d/1K7rRdlcSheclJ6MqzpBNwSZei911WDV1Bl2zBGV38-s/edit?usp=sharing
> I then have the following code:
> /*Kieran Winner*/
> WHEN "r_Kieran" > "r_Wynne"
>        THEN ramp_color('PCMarg', scale_linear(("r_Kieran"/"r_TOTAL"-"r_Possian"/"r_TOTAL"),  0,  1, 0, 1))
> ELSE color_rgb(64, 224, 208)
> Here's the problem: The code evaluates incorrectly.
> Take row 15 of the attribute table for example. (Where PD_Number=14) You would expect that the condition would evaluate TRUE since "r_Kieran"=397 and "r_Wynne"=225.
> But, it evaluates FALSE in QGIS, as indicated by the colour that is displayed on the map!
> I've spent hours simplifying code, and pulling my hair out over this.
> Please help!
> Thanks, Evan

More information about the QGIS-Developer mailing list