<?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 + If in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433075#M430809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calculate&amp;nbsp; the Rank function and list the accounts required using CONCAT. &lt;/P&gt;&lt;P&gt;Give that variable as Dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;vDimList=CONCAT( RankCondition&amp;nbsp;&amp;nbsp; Account)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Dimension:&lt;/P&gt;&lt;P&gt;IF(Account=vDimList,&lt;SPAN style="font-size: 13.3333px;"&gt;Account)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Sep 2017 13:58:04 GMT</pubDate>
    <dc:creator>suryaa30</dc:creator>
    <dc:date>2017-09-04T13:58:04Z</dc:date>
    <item>
      <title>Rank + If in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433072#M430806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having some trouble using the rank functionality in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of what I am trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&lt;/P&gt;&lt;P&gt;[Account] = {"=Rank( If( $(SalesPreviousPeriod) &amp;gt;0 AND $(SalesCurrentPeriod) &amp;lt;=0, $(&lt;SPAN style="font-size: 13.3333px;"&gt;SalesPreviousPeriod), 0) &amp;lt;= 20"), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[Date] = {"&amp;lt;CurrentPeriodMinDate &amp;gt;=CurrentPeriodMinDate-1"}&amp;gt;} &lt;SPAN style="font-size: 13.3333px;"&gt;$(vSales))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-The rank functionality is being used because we need to apply dimension limits (top 20) in a Pivot Table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-I need the If statement to rank just those accounts which had sales in the previous period but not in the current one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-I tried pre calculating the If statement in a variable (vRankAcc) and it didn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Sum({&amp;lt; [Account] = {"=$(vRankAcc)&lt;SPAN style="font-size: 13.3333px;"&gt;"), &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[Date] = {"&amp;lt;CurrentPeriodMinDate &amp;gt;=CurrentPeriodMinDate-1"}&amp;gt;} &lt;SPAN style="font-size: 13.3333px;"&gt;$(vSales))&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;&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;Do you know if there is a different way to do it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&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;Thanks in advance&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;&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;&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;&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;&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 11:28:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433072#M430806</guid>
      <dc:creator>martinmichalski</dc:creator>
      <dc:date>2017-09-04T11:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rank + If in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433073#M430807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please provide the sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 13:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433073#M430807</guid>
      <dc:creator>rohitraut</dc:creator>
      <dc:date>2017-09-04T13:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rank + If in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433074#M430808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is expression for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SalesPreviousPeriod, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SalesCurrentPeriod?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 13:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433074#M430808</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2017-09-04T13:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rank + If in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433075#M430809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calculate&amp;nbsp; the Rank function and list the accounts required using CONCAT. &lt;/P&gt;&lt;P&gt;Give that variable as Dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;vDimList=CONCAT( RankCondition&amp;nbsp;&amp;nbsp; Account)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Dimension:&lt;/P&gt;&lt;P&gt;IF(Account=vDimList,&lt;SPAN style="font-size: 13.3333px;"&gt;Account)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 13:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433075#M430809</guid>
      <dc:creator>suryaa30</dc:creator>
      <dc:date>2017-09-04T13:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rank + If in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433076#M430810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are Sales Amount expressions with set analysis filtering the period (current year and previous year)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 07:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433076#M430810</guid>
      <dc:creator>martinmichalski</dc:creator>
      <dc:date>2017-09-06T07:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rank + If in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433077#M430811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. We are going with a similar approach, as precalculating the concat accounts has better performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 07:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433077#M430811</guid>
      <dc:creator>martinmichalski</dc:creator>
      <dc:date>2017-09-06T07:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rank + If in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433078#M430812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;Do let me know how are you evaluating the equality assuming vDimList has multiple values?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;IF(Account&lt;STRONG&gt;=&lt;/STRONG&gt;vDimList,&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #edf8ca;"&gt;Account)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 08:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-If-in-Set-Analysis/m-p/1433078#M430812</guid>
      <dc:creator>suryaa30</dc:creator>
      <dc:date>2017-09-06T08:16:55Z</dc:date>
    </item>
  </channel>
</rss>

