<?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 Rank and Sum function with variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325862#M495149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={2012},Month = {"&amp;lt;=&lt;STRONG&gt;$(vmaxmonth)&lt;/STRONG&gt;"}, &lt;/P&gt;&lt;P&gt;&amp;nbsp; ProdFinal={"=rank(sum({$&amp;lt;Year={2012},Month={"&amp;lt;=&lt;STRONG&gt;$(vmaxmonth)&lt;/STRONG&gt;"}&amp;gt;}Net)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,4,1)=1"}&amp;gt;} Net) / vfactor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Feb 2012 16:18:56 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-02-28T16:18:56Z</dc:date>
    <item>
      <title>Rank and Sum function with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325861#M495148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;I am trying to create a table that dynamically updates to show the top 4 product Revenues based on a Salesperson selection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 0px; margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 0px; margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;I am using a variable so that the timeframe can be easily updated (called &lt;STRONG&gt;&lt;EM&gt;vmaxmonth&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 0px; margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 0px; margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;I am having trouble with my rank and sum equations using the variable &lt;STRONG&gt;&lt;EM&gt;vmaxmonth&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue seems to be related to the variable being contained within the rank function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;works&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp; =sum({$&amp;lt;Year={2012},Month = {"&amp;lt;=$(=vmaxmonth)"}, &lt;/P&gt;&lt;P&gt;&amp;nbsp; ProdFinal={"=rank(sum({$&amp;lt;Year={2012},Month={1,2}&amp;gt;}Net)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,4,1)=1"}&amp;gt;} Net)/vfactor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;does not work&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={2012},Month = {"&amp;lt;=$(=vmaxmonth)"}, &lt;/P&gt;&lt;P&gt;&amp;nbsp; ProdFinal={"=rank(sum({$&amp;lt;Year={2012},Month={"&amp;lt;=$(&amp;lt;=vmaxmonth)"}&amp;gt;}Net)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,4,1)=1"}&amp;gt;} Net)/vfactor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325861#M495148</guid>
      <dc:creator />
      <dc:date>2012-02-28T16:15:07Z</dc:date>
    </item>
    <item>
      <title>Rank and Sum function with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325862#M495149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={2012},Month = {"&amp;lt;=&lt;STRONG&gt;$(vmaxmonth)&lt;/STRONG&gt;"}, &lt;/P&gt;&lt;P&gt;&amp;nbsp; ProdFinal={"=rank(sum({$&amp;lt;Year={2012},Month={"&amp;lt;=&lt;STRONG&gt;$(vmaxmonth)&lt;/STRONG&gt;"}&amp;gt;}Net)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,4,1)=1"}&amp;gt;} Net) / vfactor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:18:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325862#M495149</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-28T16:18:56Z</dc:date>
    </item>
    <item>
      <title>Rank and Sum function with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325863#M495150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately this does not work. it doesnt seem to work with the &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;"&amp;lt;=&lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;$(vmaxmonth)&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;" within the rank function&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325863#M495150</guid>
      <dc:creator />
      <dc:date>2012-02-28T16:26:12Z</dc:date>
    </item>
    <item>
      <title>Rank and Sum function with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325864#M495151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I now see that you are embedding double quotes in double quotes, I think that's the problem. Let me think...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325864#M495151</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-28T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Rank and Sum function with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325865#M495152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try creating a new variable vmaxmonthexp in variable overview:&lt;/P&gt;&lt;P&gt;=concat({&amp;lt;Month={"&amp;lt;=$(vmaxmonth)"}&amp;gt;} distinct Month,',')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you could use this variable in the set element(s) instead of "&amp;lt;=$(vmaxmonth)":&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={2012},Month = {&lt;STRONG&gt;$(vmaxmonthexp)&lt;/STRONG&gt;}, &lt;/P&gt;&lt;P&gt;&amp;nbsp; ProdFinal={"=rank(sum({$&amp;lt;Year={2012},Month={&lt;STRONG&gt;$(vmaxmonthexp)&lt;/STRONG&gt;}&amp;gt;} Net)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,4,1)=1"}&amp;gt;} Net) / vfactor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I have missed something easier, but this should work.&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>Tue, 28 Feb 2012 17:11:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325865#M495152</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-28T17:11:38Z</dc:date>
    </item>
    <item>
      <title>Rank and Sum function with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325866#M495153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;works, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 17:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325866#M495153</guid>
      <dc:creator />
      <dc:date>2012-02-28T17:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rank and Sum function with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325867#M495154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please help me out ...&lt;/P&gt;&lt;P&gt;please check the below link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/411018#411018"&gt;http://community.qlik.com/message/411018#411018&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 07:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-and-Sum-function-with-variables/m-p/325867#M495154</guid>
      <dc:creator>suvechha_b</dc:creator>
      <dc:date>2013-10-24T07:55:40Z</dc:date>
    </item>
  </channel>
</rss>

