<?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: Simple math - number compression in qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617130#M1103454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is working fine for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2014 00:51:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-25T00:51:20Z</dc:date>
    <item>
      <title>Simple math - number compression in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617129#M1103452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please don't freak out. This question is small. I only added a lot of notes and sample tables to make it clear. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following notes are taken from the book - Qlikview 11 for developers -&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if we have a measure that contains integer numbers ranging &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;from 0 to 100,000,000, we can potentially end up with 100 million unique values. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;As an alternative, we could split the number into two 10,000 (the square root of 100 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;million) number ranges using the&amp;nbsp; Div() and&amp;nbsp; Mod() functions, shown here:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Div(BigNumber, 10000) as BigNumber1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mod(BigNumber, 10000) as BigNumber2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM BigNumber;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first expression in the preceding code performs an integer division of the value &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;of&amp;nbsp; BigNumber by 10,000. This means that only the resulting whole number is stored. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The second expression performs a modulo operation, storing only the remainder of &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;BigNumber divided by 10,000. Both of these fields have a potential of 10,000 unique &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;values. That's 20,000 possible unique values when combined, or only 0.2 percent of &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;the original list.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG style="font-size: 14pt;"&gt;Question - This logic does not give me the correct values in qlik view. Why ?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG style="font-size: 14pt;"&gt;File - &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;BigNumber&lt;/P&gt;&lt;P&gt;10,001;&lt;/P&gt;&lt;P&gt;10,002;&lt;/P&gt;&lt;P&gt;10,003;&lt;/P&gt;&lt;P&gt;11,0001;&lt;/P&gt;&lt;P&gt;12,0002;&lt;/P&gt;&lt;P&gt;13,0003;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;Expected value as per math logic/SQL - &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;select BigNumber, BigNumber/10000 as Div, BigNumber%10000 as Mods&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;from BigNumber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;BigNumber&lt;/TD&gt;&lt;TD&gt;Div&lt;/TD&gt;&lt;TD&gt;Mods&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10001&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10002&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10003&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;110001&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;120002&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;130003&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14pt;"&gt;Qlikview output (imagine it as list boxes) - &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BigNumber1 {1}&lt;/P&gt;&lt;P&gt;BigNumber2 {1,2,3}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG style="font-size: 14pt;"&gt;Qlikview Script - &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[BigData]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Div(BigNumber, 10000) as BigNumber1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mod(BigNumber, 10000) as BigNumber2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[..\..\..\..\Examples\BigNumberCompress.txt]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(txt, codepage is 1252, embedded labels, delimiter is ';', msq);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Why is&amp;nbsp; my qlikview giving the wrong result ?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 00:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617129#M1103452</guid>
      <dc:creator />
      <dc:date>2014-03-25T00:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Simple math - number compression in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617130#M1103454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is working fine for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 00:51:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617130#M1103454</guid>
      <dc:creator />
      <dc:date>2014-03-25T00:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Simple math - number compression in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617131#M1103456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added it as a list box, whereas you added it as a table box. Why is the list box not showing the values correctly ?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 00:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617131#M1103456</guid>
      <dc:creator />
      <dc:date>2014-03-25T00:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Simple math - number compression in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617132#M1103458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, my data file has semi-colons at the end of each row, but yours does not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 00:58:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617132#M1103458</guid>
      <dc:creator />
      <dc:date>2014-03-25T00:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Simple math - number compression in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617133#M1103460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there you go. Your format and list boxes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 01:45:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617133#M1103460</guid>
      <dc:creator />
      <dc:date>2014-03-25T01:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simple math - number compression in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617134#M1103462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John, Can you mark this thread as "Answered". Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 06:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-math-number-compression-in-qlikview/m-p/617134#M1103462</guid>
      <dc:creator />
      <dc:date>2014-03-25T06:04:12Z</dc:date>
    </item>
  </channel>
</rss>

