<?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 Odd results from the function floor() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003430#M650330</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have values in a chart where I do not want the results to round past .0001.&amp;nbsp; I am using the Floor() function to drop values past this value. In most cases it works as I would expect but not always.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula being used is&amp;nbsp; floor(TotalPointsEarned/TotalPointsPossible,.0001)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice the first record and how it takes the 7/10 = .7 and turns it into .6999 but in all other cases it works properly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="654"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;TotalPointsEarned&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;TotalPointsPossible&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="149"&gt;TotalPointsEarned/TotalPointsPossible&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="309"&gt;floor(TotalPointsEarned/TotalPointsPossible,.0001)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl64" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.7&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.6999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.818181818&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.8181&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.909090909&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.9090&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;10.75&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.895833333&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.8958&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;9.75&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;13&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.75&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.7500&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Sep 2015 23:56:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-22T23:56:14Z</dc:date>
    <item>
      <title>Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003430#M650330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have values in a chart where I do not want the results to round past .0001.&amp;nbsp; I am using the Floor() function to drop values past this value. In most cases it works as I would expect but not always.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula being used is&amp;nbsp; floor(TotalPointsEarned/TotalPointsPossible,.0001)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice the first record and how it takes the 7/10 = .7 and turns it into .6999 but in all other cases it works properly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="654"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;TotalPointsEarned&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;TotalPointsPossible&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="149"&gt;TotalPointsEarned/TotalPointsPossible&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="309"&gt;floor(TotalPointsEarned/TotalPointsPossible,.0001)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl64" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.7&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.6999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.818181818&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.8181&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.909090909&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.9090&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;10.75&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.895833333&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.8958&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top: none;"&gt;9.75&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;13&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0.75&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.7500&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 23:56:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003430#M650330</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-22T23:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003431#M650331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Yes you are right. In excel it gives 0.7 for Floor(0.7,0.0001).&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Check the below link..&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;A href="https://community.qlik.com/thread/79632"&gt;Doubts in understanding the ceil and floor functions&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Not sure about this. But, check this..&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;In this case (in QV), the multiple of 0.0001 are&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;0.0001&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;0.0002&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;...&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;...&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;0.6999&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;0.7&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99754_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 02:44:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003431#M650331</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-09-23T02:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003432#M650332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Settu,&lt;/P&gt;&lt;P&gt;Thank you for the response.&amp;nbsp; The link to the article really helped explain what is really happening with ceil() and floor().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still had the problem of dropping any values after the 4th position due to the team not wanting rounding past the 100th percent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At random I tried left(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TotalPointsEarned/TotalPointsPossible, 6) and that dropped off the remaining values to cure the rounding.&amp;nbsp; I am really surprised this worked as I thought it was only design for text.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 05:29:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003432#M650332</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-23T05:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003433#M650333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&lt;/P&gt;&lt;P&gt;Maybe I spoke too soon.&amp;nbsp; Now I am really confused.&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;&lt;BR /&gt;&lt;/SPAN&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;In a chart &lt;STRONG&gt;left(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;TotalPointsEarned/TotalPointsPossible, 6) &lt;/STRONG&gt;gives a value of&lt;STRONG&gt; .7 &lt;/STRONG&gt;but that same formula in the load script returns a value of&lt;STRONG&gt; .6999&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I am trying to do is cut off the last values to the 100th place as a percent without rounding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So &lt;STRONG&gt;.8432684&lt;/STRONG&gt; would cut off the &lt;STRONG&gt;684&lt;/STRONG&gt; leaving &lt;STRONG&gt;.8432&lt;/STRONG&gt; and then I format as &lt;STRONG&gt;84.32%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In addition &lt;STRONG&gt;.7&lt;/STRONG&gt; would stay &lt;STRONG&gt;.7&lt;/STRONG&gt; and finally format as &lt;STRONG&gt;70%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some other function that would trim off the last values without rounding or dropping to some next closest value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 05:42:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003433#M650333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-23T05:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003434#M650334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you try with num?&amp;nbsp; like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Num(.8432,'#,##0.00%')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 05:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003434#M650334</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-09-23T05:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003435#M650335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is rounding issue caused by the fact that 0.7 cannot be exactly represented in the binary scheme used in ISO standard floating point numbers used by QV. Much like 1/3 cannot be exactly represented in base 10 - 0.3333 is an approximation, no matter how many decimal places you use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally this error is small and not significant (usually in the 12-14th decimal place), but here the floor function is rounding down to 0.6999 because the actual number is minutely smaller than .7. You will see this with other numbers that cannot be exactly represented such as 0.6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 06:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003435#M650335</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-23T06:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003436#M650336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did try that and it rounds the value up.&lt;/P&gt;&lt;P&gt;For example &lt;STRONG&gt;.82828282&lt;/STRONG&gt; becomes &lt;STRONG&gt;82.83%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this is interesting and odd.&amp;nbsp; I am not sure if something was being held in memory but I cleared all data from the app and then reran again with the &lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;left(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;TotalPointsEarned/TotalPointsPossible, 6) &lt;/STRONG&gt;and it gave me the same value of&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt; .7 &lt;/STRONG&gt;that the formula in chart did.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's interesting, I searched throughout the community and did not see anything about the left() function on a number to trim off the trailing values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again Settu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 06:09:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003436#M650336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-23T06:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Odd results from the function floor()</title>
      <link>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003437#M650337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;It's funny you mention 0.6.&amp;nbsp; That was the other instance where this was happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you mentioned, typically this is not a factor but this relates directly to agents scorecards and we have set the cutoff with no rounding as it can push them up into a higher scored category. So the actual cutoff value here is important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for explaining why this was happening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 06:14:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Odd-results-from-the-function-floor/m-p/1003437#M650337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-23T06:14:05Z</dc:date>
    </item>
  </channel>
</rss>

