<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Basic mathematics gives wrong result in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Basic-mathematics-gives-wrong-result/m-p/1354445#M415840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because, We don't know whether how many decimals we get after that calculation. I know 1 is wrong in your case. Try some thing like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=If((2700/600000)*100&amp;lt;0.45,1, 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I assume, this will return 1 because as i mentioned before line we are not understand the decimal point&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Ceil(2700/600000)*100&amp;lt;0.45,1, 0)&lt;/P&gt;&lt;P&gt;I assume, The calculation part is wrong it should return 0, Because now ceil() function can understand the decimal points where we are using calculation of %. If this condition returns 0 then the condition true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want, More information he will offer you better than me &lt;A href="https://community.qlik.com/qlik-users/27943"&gt;marcus_sommer&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meantime, go to help and check Round() and Ceil() functions to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Jun 2017 05:56:36 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-06-25T05:56:36Z</dc:date>
    <item>
      <title>Basic mathematics gives wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-mathematics-gives-wrong-result/m-p/1354444#M415839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you try this in Qlikview text box and see what result you get. =If((2700/600000)*100&amp;lt;0.45,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get 1, tried multiple versions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jun 2017 02:28:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-mathematics-gives-wrong-result/m-p/1354444#M415839</guid>
      <dc:creator />
      <dc:date>2017-06-25T02:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Basic mathematics gives wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-mathematics-gives-wrong-result/m-p/1354445#M415840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because, We don't know whether how many decimals we get after that calculation. I know 1 is wrong in your case. Try some thing like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=If((2700/600000)*100&amp;lt;0.45,1, 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I assume, this will return 1 because as i mentioned before line we are not understand the decimal point&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Ceil(2700/600000)*100&amp;lt;0.45,1, 0)&lt;/P&gt;&lt;P&gt;I assume, The calculation part is wrong it should return 0, Because now ceil() function can understand the decimal points where we are using calculation of %. If this condition returns 0 then the condition true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want, More information he will offer you better than me &lt;A href="https://community.qlik.com/qlik-users/27943"&gt;marcus_sommer&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meantime, go to help and check Round() and Ceil() functions to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jun 2017 05:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-mathematics-gives-wrong-result/m-p/1354445#M415840</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-06-25T05:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Basic mathematics gives wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-mathematics-gives-wrong-result/m-p/1354446#M415841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3471"&gt;Rounding Errors&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, you could try to multiply both sides of the equation with 100 and maybe add round to the left side (assuming that the numbers are not fixed, but part of e.g. an aggregation and right side is a constant threshold) to overcome this issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=((2700/600000)*100)*100 &amp;lt; 45 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Round(&lt;EM&gt;YourCalculation*100&lt;/EM&gt;) &amp;lt; 45 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jun 2017 07:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-mathematics-gives-wrong-result/m-p/1354446#M415841</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-06-25T07:04:46Z</dc:date>
    </item>
  </channel>
</rss>

