<?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: Set Analysis with Rank in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469775#M490680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answers, I tried both but they haven't worked. I have included a dashboard with dummy data so it may help. If you highlight Apr - Sep the total on the table is correct, using the expression for YTD results in the wrong number, i think month will be the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shree909 - I tried your expression but had to modify it slightly, it hasn't worked however.&lt;/P&gt;&lt;P&gt;Satheesh - I am not using version 11, so don't have that option, I will install the latest version though and give it a go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am intrigued however to figure this expression out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Oct 2012 22:17:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-05T22:17:24Z</dc:date>
    <item>
      <title>Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469772#M490677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a straight table and I only want to display the top 20 and Buying Groups and the Total of those Top 20 Buying Groups. If I create a set analysis expression and limit the presentation of the table to the first 20 the total at the bottom does not work. To fix this I thought I could use the Rank function to get the MTD and YTD figures. For some reason I just can't get the expression to work for YTD and I am not sure 100% if MTD is right either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please point me in the right direction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={"2012"}, Month={"&amp;gt;=4&amp;lt;=9"},[Buying Group]={"=rank(sum([Exclusive Amount]))&amp;lt;=20"}&amp;gt;} [Exclusive Amount])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2012 03:12:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469772#M490677</guid>
      <dc:creator />
      <dc:date>2012-10-05T03:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469773#M490678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; =rank(sum({&amp;lt;Year={"2012"}, Month={"&amp;gt;=4&amp;lt;=9"},[Buying Group]={"[Exclusive Amount]'}&amp;gt;} [Exclusive Amount]) &amp;lt;=20&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2012 04:38:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469773#M490678</guid>
      <dc:creator>shree909</dc:creator>
      <dc:date>2012-10-05T04:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469774#M490679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i understand your requirement correct, you need to show top 20 values and the total of the 20 values in the StraightTable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To acheive this you can use the dimension limits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select --&amp;gt; dimension limits and set the Limits to Larget 20 only.&lt;/P&gt;&lt;P&gt;Go to Expression Tab, sleect the expression and in the "Total Mode" option, change it from Expression default to "sum" of rows explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Satheesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2012 06:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469774#M490679</guid>
      <dc:creator />
      <dc:date>2012-10-05T06:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469775#M490680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answers, I tried both but they haven't worked. I have included a dashboard with dummy data so it may help. If you highlight Apr - Sep the total on the table is correct, using the expression for YTD results in the wrong number, i think month will be the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shree909 - I tried your expression but had to modify it slightly, it hasn't worked however.&lt;/P&gt;&lt;P&gt;Satheesh - I am not using version 11, so don't have that option, I will install the latest version though and give it a go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am intrigued however to figure this expression out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2012 22:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469775#M490680</guid>
      <dc:creator />
      <dc:date>2012-10-05T22:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469776#M490681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I installed QV11 but it doesn't work.&lt;/P&gt;&lt;P&gt;I have included an updated dashboard with sample data.&lt;/P&gt;&lt;P&gt;Its weird!&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2012 22:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469776#M490681</guid>
      <dc:creator />
      <dc:date>2012-10-05T22:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469777#M490682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension Limits restrict the values based on first expression in the chart.In your sample, since Current Month is being the first epression, the top 20 buying group for the current month has been selected and the sum(YTD) for those buying groups is 353018. However if you want to select the top 20 Buing groups based on the YTD then you have to move the YTD exp as the first one in the table and this will give you the sum(YTD) as 491307 as you are expecting it to be &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Satheesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2012 06:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469777#M490682</guid>
      <dc:creator />
      <dc:date>2012-10-06T06:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469778#M490683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satheesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope attached file helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2012 14:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469778#M490683</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-10-06T14:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469779#M490684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satheesh - What you said is correct, as I moved the expression to be first it worked using the limited dimensions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jagan - Your example was very helpful thank you, I am able now to get current month spot on using rank, however what seems to happen now is my YTD on the same chart does not sum up correctly. I have included the same dashboard to show it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't seem to get a YTD alongside my current month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 22:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469779#M490684</guid>
      <dc:creator />
      <dc:date>2012-10-16T22:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469780#M490685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this as calculated dimension in your table chart at the right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=aggr(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(rank(sum(&lt;STRONG&gt;{$&amp;lt;Year={"2012"}, Month={"&amp;gt;=4&amp;lt;=9"}&amp;gt;}&lt;/STRONG&gt;[Exclusive Amount]))&amp;lt;21, &lt;STRONG&gt;only({1}&lt;/STRONG&gt;[Buying Group]) )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,[Buying Group])&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 22:28:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469780#M490685</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-16T22:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469781#M490686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, that gave the correct answer for YTD, but now the Curr. Month Column is out.&lt;/P&gt;&lt;P&gt;Man this is probably the worst and annoying straight table issue I have had.&lt;/P&gt;&lt;P&gt;You would think if you want the top 20 curr and YTD QlikView could do this as standard!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the doc with your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 01:20:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469781#M490686</guid>
      <dc:creator />
      <dc:date>2012-10-17T01:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469782#M490687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe I am a bit confused what you want to see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you want to the the top 20 Buying Group by sum(Exclusive Amount) for the selected period (1 Month).&lt;/P&gt;&lt;P&gt;Then you want to display this sum(Exclusive Amount), and the accumulated sum(Exclusive Amount) for the period starting 5 months prior the selected month and including the end of the selected month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you should be fine by just using [Buying Group] as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then one expression to see the sum(Exclusive Amount) for the selected month, only for the top 20 in this selected month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;[Buying Group]={"=rank(sum([Exclusive Amount]))&amp;lt;21"}&amp;gt;}[Exclusive Amount])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and one expression for the top 20, but for the last 6 months:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&amp;lt;[Buying Group]={"=rank(sum([Exclusive Amount]))&amp;lt;21"}, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Year=, Month= ,Date={"$(='&amp;gt;='&amp;amp;addmonths(MonthsStart(1,date(date#(Only([Month Year]),'MMM-YYYY'))),-5)&amp;amp;'&amp;lt;='&amp;amp;MonthsEnd(1,date(date#(Only([Month Year]),'MMM-YYYY'))))"}&amp;gt;}&amp;nbsp; [Exclusive Amount])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I am clearing now the selections in the other calendar fields Year and Month (and you should potentially add all calendar fields here that a user might do selections in, that may interfere with the set modifier for Date).&lt;/P&gt;&lt;P&gt;I think the set modifier for Date can be slightly simplified, for example if you use a Month Year field that holds a numerical value for the monthstart itself (like QV created value using MonthName() ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note that this expression breaks if the user selects more than one Month Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not what you want, I think I would need a clarification of your requirements first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 09:39:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469782#M490687</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-17T09:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469783#M490688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You right in my requirements, I am looking for Curr Month ($79,048) and YTD(APR-SEP) $491,306.&lt;/P&gt;&lt;P&gt;When I use Buying Group and your suggested expressions you can see the Curr Month is correct, but YTD is incorrect, this has been the problem from the start. &lt;/P&gt;&lt;P&gt;The last post by &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/swuehl" id="jive-158233885378378380995"&gt;swuehl&lt;/A&gt; worked for YTD but made the Curr Month total incorrect, I can't seem to get BOTH columns showing the correct values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have included the sample dashboard with a table using your expressions, you can see Curr Month is correct, YTD is incorrect. &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/swuehl" id="jive-158233885378378380995"&gt;swuehl&lt;/A&gt; table YTD is correct, Curr Month is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469783#M490688</guid>
      <dc:creator />
      <dc:date>2012-10-17T20:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469784#M490689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I manually add up sum(Exclusive Amount) for the months Apr to Sep 2012 &lt;EM&gt;for the same group that makes top20 in Sep,&lt;/EM&gt; I do get 353,018, not 491,306, so it matches my YTD expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain how you get to your higher number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469784#M490689</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-17T20:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469785#M490690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I manually highlight the months at the top Apr-Sep the amount is $491,306. Select just Sep the Curr Month is correct, however YTD now is $353,018. You would expect it to be $491,306 since the expression should be doing the same thing as highlighting Apr-Sep manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 23:31:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469785#M490690</guid>
      <dc:creator />
      <dc:date>2012-10-17T23:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469786#M490691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you compare the totals like that, I think you are comparing apples with oranges, since you are changing the members of the buying group that makes up TOP 20 in the current application, because the TOP20 is calculated for the selected period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you want the TOP 20 group for the highest Year Month selected then (i.e. Sep 2012), but you need to tell QV this, maybe like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Buying Group]={"=rank(sum({&amp;lt;Date={'&amp;gt;=$(=Date(monthstart(max(Date))))&amp;lt;=$(=Date(max(Date)))'}, Year, Month, [Month Year]&amp;gt;} [Exclusive Amount]))&amp;lt;21"}, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Year=,Month=, [Month Year]=,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date={"&amp;gt;=$(=Date(monthstart(max(Date),-5)))&amp;lt;=$(=Date(max(Date)))"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;}&amp;nbsp; [Exclusive Amount])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Buying Group]={"=rank(sum({&amp;lt;Date={'&amp;gt;=$(=Date(monthstart(max(Date))))&amp;lt;=$(=Date(max(Date)))'}, Year, Month, [Month Year]&amp;gt;}[Exclusive Amount]))&amp;lt;21"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;}[Exclusive Amount])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check also attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 09:28:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469786#M490691</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-18T09:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469787#M490692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers for post, the YTD total still calculates to $353,017 with your expression. You right I do want the top 20 Buying Group for selected period, however the correct YTD total Apr-Sep is $491,307, and the correct Curr Month should be $79,048, good thing is Curr Month is correct.&lt;/P&gt;&lt;P&gt;I understand Curr Month ranking will be Buying Group will be different separately, however if I benchmark top 20 on YTD all i would like to do is show the Curr Month value for that Buy Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really do appreaciate your help on this, perhaps I am just not understanding something, but from my experience with set analysis all I am trying to do is replicate the filter process I am doing manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 20:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469787#M490692</guid>
      <dc:creator />
      <dc:date>2012-10-18T20:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469788#M490693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it seems that you want to compare the current Month Value for the TOP20 of that Month, but the YTD Value for the Top 20 of previous 6 month (Apr to Sep). As said, these are two different sets of Buying Group values. &lt;/P&gt;&lt;P&gt;But for sure you can show them in the same table graph, it seems that this is what you were after all the time. The numbers should now be correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just change in YTD expression the lower date limit in the set modifier for the sum in the rank:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;[Buying Group]={"=rank(sum({&amp;lt;Date={'&amp;gt;=$(=Date(monthstart(max(Date)&lt;STRONG&gt;,-5&lt;/STRONG&gt;)))&amp;lt;=$(=Date(max(Date)))'}, Year, Month, [Month Year]&amp;gt;}[Exclusive Amount]))&amp;lt;21"}, Year=,Month=, [Month Year]=,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date={"&amp;gt;=$(=Date(monthstart(max(Date),-5)))&amp;lt;=$(=Date(max(Date)))"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;}&amp;nbsp; [Exclusive Amount])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not what you want, I am at the end with my ideas. Maybe someone else can jump in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice weekend,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 17:48:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469788#M490693</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-19T17:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469789#M490694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Man its correct thank you so much, what a crazy expression it has turned out to be. The logic is not how I imagined it, but makes sense now I see it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thank you for your continued support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 02:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Rank/m-p/469789#M490694</guid>
      <dc:creator />
      <dc:date>2012-10-24T02:23:13Z</dc:date>
    </item>
  </channel>
</rss>

