[Qgis-user] Case

Eddison Araya eddisonjose at gmail.com
Fri Aug 24 05:19:58 PDT 2018


Hello Renato, thank you very much, I just tried the formula and it worked

regards

Eddison

El jue., 23 ago. 2018 a las 17:56, Renato Saboya (<rtsaboya at gmail.com>)
escribió:

> Eddison, try this:
>
> CASE
>   WHEN ( "W_BRILLO"  = 3 AND "W_PPT" =1 AND "W_TEMP"=2) THEN 2
>   WHEN ("W_BRILLO"  = 2 AND "W_PPT" =2 AND "W_TEMP"=3) THEN 2
>   WHEN ("W_BRILLO"  = 1 AND "W_PPT" =2 AND "W_TEMP"=3) THEN 3
>   ELSE 5
> END
>
> Note, however, that you don't have any of these combinations in your
> table, so you will get only null values. I put the "ELSE 5" there just so
> you know the code is working.
>
> Also, bear in mind that the lines inside CASE and END must be indented by
> two spaces.
>
> Cheers,
>
> *Renato*
>
>
> On Thu, 23 Aug 2018 at 18:05, Eddison Araya <eddisonjose at gmail.com> wrote:
>
>> Hello, greetings, a question:
>>
>> [image: image.png]
>>
>> If I have that map:  *https://www.dropbox.com/s/6hvnrb37fvc00wl/ejemplo.zip?dl=0
>> <https://www.dropbox.com/s/6hvnrb37fvc00wl/ejemplo.zip?dl=0> *
>>
>> E eu quero dizer:
>>  Se W_BRILLO is equal to 3, se W_PPT is equal to 1, se W_TEMP is equal to
>> 2, have a value of  2
>>
>> Se W_BRILLO   is equal to    2, se W_PPT  is equal to    2, se W_TEMP is
>> equal to   3, have a value of 2
>>
>> Se W_BRILLO  is equal to    1, se W_PPT  is equal to    2, se W_TEMP  is
>> equal to    3, have a value of 3
>>
>> I put this:
>>
>> CASE
>>
>> WHEN "W_BRILLO" = '3', "W_PPT" ='1', "W_TEMP" = '2' THEN 2
>> WHEN "W_BRILLO" = '2', "W_PPT" ='2', "W_TEMP" = '3' THEN 2
>> WHEN W_BRILLOI = '1', "W_PPT" ='2', "W_TEMP" = '3' THEN  3
>>
>>  END
>>
>>
>> But I get an error!
>>
>> Thank you
>>
>> Eddison
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180824/0037982a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 7944 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180824/0037982a/attachment.png>


More information about the Qgis-user mailing list