<?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 Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384161#M143454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tina, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible for you to share a sample app for this with expected results? I believe in&amp;nbsp; expression "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;pct_chg_MOM" you are using set analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did the similar thing, by using set analysis, and taking max month number from selection and then comparing it with previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must have a unique number, to identify which month is going.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this we use MonthSeq calculated in script while creating master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Month(TempDate)) + (YearStd-1)*12 AS MonthSeq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Apr 2014 06:16:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-30T06:16:09Z</dc:date>
    <item>
      <title>Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384154#M143447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain rank function with an example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Murali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 04:57:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384154#M143447</guid>
      <dc:creator />
      <dc:date>2012-09-05T04:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384155#M143448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi murali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brief explaination of rank function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a calculated dimension to display top N values&lt;/P&gt;&lt;P&gt;Make sure that you check “Suppress when value is NULL” for the calculated dimension.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: blue;"&gt;Rank&lt;/SPAN&gt;(&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: red;"&gt;product&lt;/SPAN&gt;))&lt;SPAN style="color: gray;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;STRONG style="color: maroon; font-family: 'Courier New';"&gt;5 &lt;/STRONG&gt;,&lt;SPAN style="color: red;"&gt;name&lt;/SPAN&gt;),&lt;SPAN style="color: red;"&gt;name&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;Above expression creates below list of 5 products&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/52036_Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks praneetha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 11:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384155#M143448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T11:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384156#M143449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/52038_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 11:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384156#M143449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T11:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384157#M143450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;see attachment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 12:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384157#M143450</guid>
      <dc:creator />
      <dc:date>2014-01-24T12:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384158#M143451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pls check enclosed file...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 12:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384158#M143451</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-24T12:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384159#M143452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rank function:&lt;/P&gt;&lt;P&gt;It is just like giving Serial number to our record set based by some field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose if we have as below:&lt;/P&gt;&lt;P&gt;Product , Quantity&lt;/P&gt;&lt;P&gt;Shoes, 10&lt;/P&gt;&lt;P&gt;Shoes,20,&lt;/P&gt;&lt;P&gt;Shirt,1&lt;/P&gt;&lt;P&gt;Shirt, 13&lt;/P&gt;&lt;P&gt;Shirt, 14&lt;/P&gt;&lt;P&gt;Pant,12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Rank(Product) will give us row number based on different product values&lt;/P&gt;&lt;P&gt;Product , Quantity, rank(Product)&lt;/P&gt;&lt;P&gt;Shoes, 10,1&lt;/P&gt;&lt;P&gt;Shoes,20,,2&lt;/P&gt;&lt;P&gt;Shirt,1,3&lt;/P&gt;&lt;P&gt;Shirt, 13,1&lt;/P&gt;&lt;P&gt;Shirt, 14,2&lt;/P&gt;&lt;P&gt;Pant,12,1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 13:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384159#M143452</guid>
      <dc:creator />
      <dc:date>2014-01-24T13:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384160#M143453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was a very helpful discussion!&amp;nbsp; Wondering how to apply the Rank function based on a certain dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm displaying this in a trellis chart by Industry, showing the month over month % change over time.&amp;nbsp; But, I'd like to:&lt;/P&gt;&lt;P&gt;1. Rank Industries based on their % change MOM from the prior month to current.&amp;nbsp; In other words, highest % change for Mar.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Display only the top x number of Industries based on this ranking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've figured out how to Rank(pct_chg_MOM) to rank these by industry, and also how to Rank(total pct_chg_MOM) to get overall ranks, but am not clear how to accomplish the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option I thought of is to use rank(total pct_chg_MOM) but then look only at Mar.&amp;nbsp; But again, stuck on how to look only at Mar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data looks like this:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="width: 100%; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Industry&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;pct_chg_MOM&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Rank&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jan&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-.08&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Feb&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-.03&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;1.0&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;0.9&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;1.1&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;0.4&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 16:19:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384160#M143453</guid>
      <dc:creator />
      <dc:date>2014-04-29T16:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Function</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384161#M143454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tina, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible for you to share a sample app for this with expected results? I believe in&amp;nbsp; expression "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;pct_chg_MOM" you are using set analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did the similar thing, by using set analysis, and taking max month number from selection and then comparing it with previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must have a unique number, to identify which month is going.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this we use MonthSeq calculated in script while creating master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Month(TempDate)) + (YearStd-1)*12 AS MonthSeq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 06:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Function/m-p/384161#M143454</guid>
      <dc:creator />
      <dc:date>2014-04-30T06:16:09Z</dc:date>
    </item>
  </channel>
</rss>

