<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 12, 2015 at 10:18 AM, Sebastian Andersson <span dir="ltr"><<a href="mailto:sebastian_andersson@hotmail.com" target="_blank">sebastian_andersson@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hello,<br> <br>I want to calculate the share of different population Groups in my attribute table by using the field calculator. <br>I have added a new column in the attribute table and calculated the share of young people, by dividing the number of young people with the total number of people. <br>The new values are added to the new column. However, after saving, the values are lost and the columns show 0. Why?<br></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Try </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">1.0 * young people / total people</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The problem seems to be integer division which again results in an integer value rather than the desired float value.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best wishes,</div><div class="gmail_default" style="font-size:small">Anita</div></div><div class="gmail_default" style="font-size:small"><br></div></div><br></div></div>