It worked well. Thanks Nathan.

-Leo


On Thu, Mar 27, 2014 at 1:23 PM, Nathan Woodrow <[email protected]> wrote:

> Hey Leo,
>
> Try this:
>
> ("DN" / 18.00) * 100
>
> The field calculator will integer calculations unless told one of the
> values is a real.  Adding .00 at the end is enough to for that.
>
> - Nathan
>
>
> On Thu, Mar 27, 2014 at 3:17 PM, Leo Kris Palao <[email protected]>wrote:
>
>> Deal ALL QGIS Users,
>>
>> I have a strange results when using the Field Calculator. I have an
>> integer value in one of my column ranging from 1 to 13. I would like to get
>> the percentage of it when divided by 18. So in field calculator my
>> expression is "(DN" / 18) * 100. When I execute this expression I got all 0
>> results in all cells. My column where the results should be stored is in
>> Real with Width = 3 and Precision = 3. I did the same in ArcGIS but the
>> results were correct.
>>
>> Also, I tried another method, this time I created a column first, then I
>> just divide the DN values to 18 but still the results are 0 in all cells in
>> my column.
>>
>> I am using QGIS 2.2 installed using OSGeo4W installer, with Windows 7 64
>> bit OS.
>>
>> Could anyone help me troubelshoot?
>>
>> Thanks,
>> -Leo
>>
>> _______________________________________________
>> Qgis-user mailing list
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>


-- 
*LEO KRIS M. PALAO*
GIS and Remote Sensing Specialist
Social Sciences Division - GIS Unit
International Rice Research Institute
Website: www.irri.org
Mobile #: +63(999)-99-75327
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to