<div dir="ltr">Hey Leo,<div><br></div><div>Try this:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">("DN" / 18.00) * 100</span><br></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div><font color="#000000" face="arial, sans-serif">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.</font></div><div><font color="#000000" face="arial, sans-serif"><br>

</font></div><div><font color="#000000" face="arial, sans-serif">- Nathan</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 3:17 PM, Leo Kris Palao <span dir="ltr"><<a href="mailto:lk.palao@gmail.com" target="_blank">lk.palao@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Deal ALL QGIS Users,<div><br></div><div>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.</div>



<div><br></div><div>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.</div><div><br></div><div>I am using QGIS 2.2 installed using OSGeo4W installer, with Windows 7 64 bit OS.</div>



<div><br></div><div>Could anyone help me troubelshoot?</div><div><br></div><div>Thanks,</div><div>-Leo<div dir="ltr"><input type="hidden"><input type="hidden"><div></div></div>
</div></div>
<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>