<?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: How this function works? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743242#M265389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the mod examples with positive integers are quite easy to understand. However, the negative integers divisions could be kind of confusing. In the specific example mod(-4,3) = 2, the explanation is that -4 / 3 = -1.3333. So the&amp;nbsp; Module is the remainder. With positive numbers is quite easy to understand that &lt;STRONG&gt;4 - 3 equals 1&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;But with negative the remainder would be calculated as --&amp;gt; &lt;STRONG&gt;-6 - (-4) = 2&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The explanation is that with negative numbers -3 is not less than -4&lt;/STRONG&gt;, so you'll need to look at -6 (-4 * 2 = -6 would be the next possible option for this division).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2015 17:54:48 GMT</pubDate>
    <dc:creator>jaimeaguilar</dc:creator>
    <dc:date>2015-01-06T17:54:48Z</dc:date>
    <item>
      <title>How this function works?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743236#M265383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one please let me know how it is possible, and what it the logic in it?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;mod( -4,3 ) &lt;/SPAN&gt;returns 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743236#M265383</guid>
      <dc:creator />
      <dc:date>2015-01-06T16:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: How this function works?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743237#M265384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;mod(x1 , x2)&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;BR /&gt;Mathematical modula function. Both parameters must have integer values. x2 must be greater than 0. The result is the non-negative remainder of an integer division.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The mod function is defined as the amount by which a number exceeds the largest integer multiple of the divisor that is not greater than that number. In the case of mod(-4,3), the largest number would be -6 and the difference between -6 and -4 is 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very fruity, but that's what you get playing about with negative numbers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743237#M265384</guid>
      <dc:creator>ThornOfCrowns</dc:creator>
      <dc:date>2015-01-06T16:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: How this function works?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743238#M265385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;From Qlikview HelpF1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;mod(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;x1 , x2&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Mathematical modula function. Both parameters must have integer values. &lt;SPAN class="Italic"&gt;x2&lt;/SPAN&gt; must be greater than 0. The result is the non-negative remainder of an integer division. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;mod( 7,2 ) &lt;/SPAN&gt;returns 1&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;mod( 7.5,2 ) &lt;/SPAN&gt;returns NULL&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;mod( 9,3 ) &lt;/SPAN&gt;returns 0&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;mod( -4,3 ) &lt;/SPAN&gt;returns 2&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;mod( 4,-3 ) &lt;/SPAN&gt;returns NULL&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;mod( -4,-3 ) &lt;/SPAN&gt;returns NULL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:48:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743238#M265385</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2015-01-06T16:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: How this function works?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743239#M265386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;James Summerson and Jonathan Penuliar&amp;nbsp; i need explanation for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743239#M265386</guid>
      <dc:creator />
      <dc:date>2015-01-06T16:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How this function works?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743240#M265387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it's working like the Excel function, and this function can be (according to Excel Help) evaluated like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;MOD(n, d) = n - d*INT(n/d)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;So:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;mod(-4,3) = -4 - 3*(-2) = +2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743240#M265387</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-01-06T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: How this function works?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743241#M265388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have edited my reply to suit, &lt;A href="https://community.qlik.com/qlik-users/158134"&gt;johnDawson&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743241#M265388</guid>
      <dc:creator>ThornOfCrowns</dc:creator>
      <dc:date>2015-01-06T16:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: How this function works?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743242#M265389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the mod examples with positive integers are quite easy to understand. However, the negative integers divisions could be kind of confusing. In the specific example mod(-4,3) = 2, the explanation is that -4 / 3 = -1.3333. So the&amp;nbsp; Module is the remainder. With positive numbers is quite easy to understand that &lt;STRONG&gt;4 - 3 equals 1&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;But with negative the remainder would be calculated as --&amp;gt; &lt;STRONG&gt;-6 - (-4) = 2&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The explanation is that with negative numbers -3 is not less than -4&lt;/STRONG&gt;, so you'll need to look at -6 (-4 * 2 = -6 would be the next possible option for this division).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 17:54:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-function-works/m-p/743242#M265389</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2015-01-06T17:54:48Z</dc:date>
    </item>
  </channel>
</rss>

