<?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: Rank in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274385#M864743</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD A,B,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(A,'|',1) as ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(A,'|',2) as Flag,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date#(SubField(A,'|',3),'YYYYMMDD') as Date&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;[Book1 (1).xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, table is Sheet2);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temp1:&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;&amp;nbsp; if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1) as delta,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Flag = 'Weekly', If(Flag = Previous(Flag), if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1), 1)) as Weekly_Rank,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Flag = 'Monthly', If(Flag = Previous(Flag), if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1), 1)) as Monthly_Rank,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Flag = 'Live', If(Flag = Previous(Flag), if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1), 1)) as Live_Rank&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Fact&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Flag, ID, Date desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Fact;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2016 13:22:59 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-12-16T13:22:59Z</dc:date>
    <item>
      <title>Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274382#M864740</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;Below is the calculations which i want to achieve in script &lt;/P&gt;&lt;P&gt;these calculated dimensions are working correctly but i need that in load script &lt;/P&gt;&lt;P&gt;please suggest &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Weekly_Rank&lt;/TD&gt;&lt;TD&gt;=aggr(rank(sum({&amp;lt;Flag={"Weekly"}&amp;gt;}delta)),ID,Flag,delta)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Monthly_Rank&lt;/TD&gt;&lt;TD&gt;=aggr(rank(sum({&amp;lt;Flag={"Monthly"}&amp;gt;}delta)),ID,Flag,delta)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Live_Rank&lt;/TD&gt;&lt;TD&gt;=aggr(rank(sum({&amp;lt;Flag={"Live"}&amp;gt;}delta)),ID,Flag,delta)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274382#M864740</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274383#M864741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a qvw where you have already loaded this data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 13:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274383#M864741</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-16T13:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274384#M864742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please find attached qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 13:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274384#M864742</guid>
      <dc:creator />
      <dc:date>2016-12-16T13:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274385#M864743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD A,B,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(A,'|',1) as ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(A,'|',2) as Flag,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date#(SubField(A,'|',3),'YYYYMMDD') as Date&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;[Book1 (1).xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, table is Sheet2);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temp1:&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;&amp;nbsp; if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1) as delta,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Flag = 'Weekly', If(Flag = Previous(Flag), if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1), 1)) as Weekly_Rank,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Flag = 'Monthly', If(Flag = Previous(Flag), if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1), 1)) as Monthly_Rank,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Flag = 'Live', If(Flag = Previous(Flag), if(Peek(ID,-1)&amp;lt;&amp;gt;ID,1,Peek(delta,-1)+1), 1)) as Live_Rank&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Fact&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Flag, ID, Date desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Fact;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 13:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274385#M864743</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-16T13:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274386#M864744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;Exactly this, and if i choose Monthly Rank =1 &lt;/P&gt;&lt;P&gt;and Flag = Monthly&lt;/P&gt;&lt;P&gt;only one date to be selected, now its choosing two dates &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 13:51:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274386#M864744</guid>
      <dc:creator />
      <dc:date>2016-12-16T13:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274387#M864745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this what you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 14:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274387#M864745</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-16T14:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274388#M864746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 15:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274388#M864746</guid>
      <dc:creator />
      <dc:date>2016-12-16T15:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274389#M864747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the monthly rank is not grouping it by distinct&amp;nbsp; Monthly Date field &lt;/P&gt;&lt;P&gt;same for weekly rank also &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 10:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274389#M864747</guid>
      <dc:creator />
      <dc:date>2016-12-19T10:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274390#M864748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your date MonthStart or MonthEnd? If not, that might be causing the issue here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 12:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274390#M864748</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-19T12:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274391#M864749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the Monthly dates are Month end dates&lt;/P&gt;&lt;P&gt;and the weekly dates are Sunday Dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 14:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274391#M864749</guid>
      <dc:creator />
      <dc:date>2016-12-19T14:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274392#M864750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using another script or the same exact script as in your sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 14:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274392#M864750</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-19T14:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274393#M864751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the same exact script as in the bok2.qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the actual problem is in the below screen shot &lt;/P&gt;&lt;P&gt;for monthly_rank 1 two dates are showing there should be only one date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 14:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274393#M864751</guid>
      <dc:creator />
      <dc:date>2016-12-19T14:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274394#M864752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a snapshot of the issue you are having? I am struggling to understand the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 14:43:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274394#M864752</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-19T14:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274395#M864753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny &lt;/P&gt;&lt;P&gt;this value in field a 120273012|monthly|20160930 should have a different Monthly_rank&lt;/P&gt;&lt;P&gt;i want the Monthly_rank to be grouped by&amp;nbsp; month end dates&lt;/P&gt;&lt;P&gt;and the weekly_rank to be grouped by weekly dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 15:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274395#M864753</guid>
      <dc:creator />
      <dc:date>2016-12-19T15:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274396#M864754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But isn't this issue resolved in Book2_v1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 15:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274396#M864754</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-19T15:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274397#M864755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Book2_v1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if Monthy_Rank 1 and 2&amp;nbsp; Selected, same values repeating &lt;IMG alt="Capture 2.PNG" class="jive-image image-1" src="/legacyfs/online/147047_Capture 2.PNG" style="height: 310px; width: 620px;" /&gt;&lt;IMG alt="capture 1.PNG" class="jive-image image-2" src="/legacyfs/online/147048_capture 1.PNG" style="height: 233px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 15:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274397#M864755</guid>
      <dc:creator />
      <dc:date>2016-12-19T15:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Rank/m-p/1274398#M864756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The values have to repeat--there are two different IDs for Date = 20161130.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where are you getting Weekly_Rank, Monthly_Rank, and Live_Rank from? Your Peek() function looks for them in the Fact table loaded from your Excel workbook, but the Excel workbook has no such fields. I think you mean to use "B" in the Peek() function, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 17:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank/m-p/1274398#M864756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-19T17:33:42Z</dc:date>
    </item>
  </channel>
</rss>

