<?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: GDR calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358822#M616443</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you expecting something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Front end:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;returntype = 'multi'&amp;gt;} units) / (Count({&amp;lt;month = {'$(=Max(month))'}&amp;gt;}units) + &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;month = {'$(=AddMonths(Max(month),-1))'}&amp;gt;}units) + &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;month = {'$(=AddMonths(Max(month),-2))'}&amp;gt;}units))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 May 2017 02:22:57 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-05-31T02:22:57Z</dc:date>
    <item>
      <title>GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358820#M616441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ALl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform a calculation, to make it more easy i report below 2 fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RETURNTYPE&lt;/P&gt;&lt;P&gt;MONTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to calcutate how many units we have with condiction (returntype='multi')/((month)+(month-1)+(month-2)) and i need it for all month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what can i do? what can be the structure of the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Massimiliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 12:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358820#M616441</guid>
      <dc:creator />
      <dc:date>2017-05-30T12:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358821#M616442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can send a sample of your data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 19:46:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358821#M616442</guid>
      <dc:creator>el_aprendiz111</dc:creator>
      <dc:date>2017-05-30T19:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358822#M616443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you expecting something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Front end:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;returntype = 'multi'&amp;gt;} units) / (Count({&amp;lt;month = {'$(=Max(month))'}&amp;gt;}units) + &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;month = {'$(=AddMonths(Max(month),-1))'}&amp;gt;}units) + &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;month = {'$(=AddMonths(Max(month),-2))'}&amp;gt;}units))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 02:22:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358822#M616443</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-31T02:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358823#M616444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can share sample data and expected output, it will help to build what is needed. Could be many ways, see if something like below, it won't work as it is, just a thought..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Source:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load Dim1,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;Month(Date) as Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;returntype,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Units&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt; From SourceData;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Monthdata:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Load &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim1,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( returntype='Multi',Count(Units)) as Multi_UnitCount;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Resident &lt;SPAN style="font-size: 13.3333px;"&gt;Source&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Group By Dim1, Month&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Order by Dim1,Return Type, Month&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;Left join (Monthdata)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Quarterdata:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Dim1,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Month,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Rangesum(Multi_UnitCount,Previous(&lt;SPAN style="font-size: 13.3333px;"&gt;Multi_UnitCount),Previous(Previous(&lt;SPAN style="font-size: 13.3333px;"&gt;Multi_UnitCount) as 3Monthscount&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident Monthdata&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 04:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358823#M616444</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-31T04:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358824#M616445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I will try to explain better the situation, what i need to do is the following table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165306_1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the file that im loading was converted in this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/165307_2.PNG" style="height: 571px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 08:07:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358824#M616445</guid>
      <dc:creator />
      <dc:date>2017-05-31T08:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358825#M616446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the answer, i add a comment to explain better the situation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 08:08:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358825#M616446</guid>
      <dc:creator />
      <dc:date>2017-05-31T08:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358826#M616447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thank you for the answer, i add a comment to explain better the situation.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 08:08:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358826#M616447</guid>
      <dc:creator />
      <dc:date>2017-05-31T08:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358827#M616448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this - &lt;/P&gt;&lt;P&gt;Source:&lt;/P&gt;&lt;P&gt;Load * inline [&lt;/P&gt;&lt;P&gt;DIM, Year, Month, ReturnType&lt;/P&gt;&lt;P&gt;DIM1, 2014, Jan, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Jan, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Feb, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Feb, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Mar, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Mar, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Apr, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Apr, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, May, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, May, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Jun, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Jun, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Jul, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Jul, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Aug, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Aug, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Sep, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Sep, MULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Oct, NOTMULTI&lt;/P&gt;&lt;P&gt;DIM1, 2014, Oct, MULTI ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(Rowno()&amp;gt;2, &lt;/P&gt;&lt;P&gt;&amp;nbsp; MultiCount/Rangesum(MonthCount,Previous(MonthCount), Previous(Previous(MonthCount)))) as GDR;&lt;/P&gt;&lt;P&gt;Load DIM, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(if(ReturnType='MULTI',1)) as MultiCount,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Count(ReturnType) as MonthCount&lt;/P&gt;&lt;P&gt;Resident Source&lt;/P&gt;&lt;P&gt;Group By DIM, Year,Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table Source;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 14:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358827#M616448</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-31T14:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: GDR calculation</title>
      <link>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358828#M616449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165351_Capture.PNG" style="height: 147px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 14:56:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GDR-calculation/m-p/1358828#M616449</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-31T14:56:43Z</dc:date>
    </item>
  </channel>
</rss>

