<?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: Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299853#M111058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To add " and &lt;STRONG&gt;[Commodity Type&lt;/STRONG&gt;] = 'Spa' "&amp;nbsp; to each IF&lt;/P&gt;&lt;P&gt;For simplicity i had used Variable1 &amp;amp; V2&lt;/P&gt;&lt;P&gt;Pls to see image attached&lt;/P&gt;&lt;P&gt;Good luck, Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2012 03:14:03 GMT</pubDate>
    <dc:creator>llauses243</dc:creator>
    <dc:date>2012-01-24T03:14:03Z</dc:date>
    <item>
      <title>Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299852#M111057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;The [MIX] field contains some null() values that I can exclude by selecting "Suppress when null values"&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;and that allows my Customer Number Rank to work fine because the Nulls are taken out of the possible records to be ranked.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;However when I want to Rank the [MIX] seperartly in addition to the [Customer Number], it will only work when i make the&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;[Commodity Type] Selection Spa. &lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;The must be a way around having to make the [Commoidty Type] selection for "Both" rankings to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;I have attached a QVW that shows both rankings working with the Selection,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;How can i get both Rankings to work Without Having to Make a Selection&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;Expression to Rank [MIX]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;=IF(Aggr(Rank(Aggr(Sum($(sCYear)[Unit Price]), MIX),3, 1), MIX)&amp;lt;= 10,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Aggr(Rank(Aggr(Sum($(sCYear)[Unit Price]), MIX), 3, 1), MIX)&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;Expression to Rank [Customer Number]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;=IF(Aggr(Rank(Aggr(Sum($(sCYear)[Unit Price]), MIX,[Customer Number]),3, 1), MIX,[Customer Number])&amp;lt;= 10,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Aggr(Rank(Aggr(Sum($(sCYear)[Unit Price]), MIX,[Customer Number]), 3, 1), MIX,[Customer Number])&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;[Commodity Type&lt;/STRONG&gt;] includes&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Accessories&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Demo&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Others&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Parts&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Spa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 17:36:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299852#M111057</guid>
      <dc:creator />
      <dc:date>2012-01-23T17:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299853#M111058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To add " and &lt;STRONG&gt;[Commodity Type&lt;/STRONG&gt;] = 'Spa' "&amp;nbsp; to each IF&lt;/P&gt;&lt;P&gt;For simplicity i had used Variable1 &amp;amp; V2&lt;/P&gt;&lt;P&gt;Pls to see image attached&lt;/P&gt;&lt;P&gt;Good luck, Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 03:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299853#M111058</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2012-01-24T03:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299854#M111059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Luis,&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;I have an excel sheet that has a list of all my variables, I added the below three new variables to that sheet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 101px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="101"&gt;&lt;P&gt;vMXRank&lt;/P&gt;&lt;P&gt;=Aggr(Rank(Aggr(Sum($(sCYear)[Unit Price]),MIX),3,1),MIX)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 101px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="101"&gt;&lt;P&gt;vMXCustRank&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;=Aggr(Rank(Aggr(Sum($(sCYear)[Unit Price]),MIX,[Customer Number]),3,1),MIX,[Customer Number])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="101"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="101"&gt;vRank&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 528px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="528"&gt;&lt;P&gt;=5&lt;/P&gt;&lt;P&gt;Then I reloaded, replaced my original calculated dimensions with the new formulas that use the new variables instead of the aggr(rank expression &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I Keep getting &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Allocated Memory Exceeded"&lt;/STRONG&gt; which usually means something is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll upload my changed QVW &lt;STRONG&gt;See the one labled with Variables &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 17:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299854#M111059</guid>
      <dc:creator />
      <dc:date>2012-01-24T17:49:50Z</dc:date>
    </item>
    <item>
      <title>Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299855#M111060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Josep,&lt;/P&gt;&lt;P&gt;In general the variables have 2 uses, as calculators or textual template&lt;/P&gt;&lt;P&gt;Then to define without starting with "=",&amp;nbsp; example vMXRank must be&amp;nbsp; Aggr(... not to use =Aggr(...&lt;/P&gt;&lt;P&gt;Luis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 19:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299855#M111060</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2012-01-24T19:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299856#M111061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i made the adjustments you recommended and now it does work &lt;STRONG&gt;however the MX RNK or Rank of the Mix &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;starts at Rank 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But &lt;STRONG&gt;when i make the selection&amp;nbsp; [Commoidty Type] Spa in the App,&lt;/STRONG&gt; then the &lt;STRONG&gt;MX RNK corrects itsself to Starting at Rank 1 instead of 2.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is that and how can this be fixed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have included my latest QVW version and changed the variable to "e" instead of "v" to indicate expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 20:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299856#M111061</guid>
      <dc:creator />
      <dc:date>2012-01-24T20:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299857#M111062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Josep,&lt;/P&gt;&lt;TABLE border="0" id="TransContent"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN id="AjaxWaitImage" style="visibility: hidden;"&gt; &lt;/SPAN&gt;&lt;DIV lang="en"&gt;I leave solution, pls to see image adjust&lt;/DIV&gt;&lt;DIV lang="en"&gt;Luis&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 15:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299857#M111062</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2012-01-25T15:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299858#M111063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the adjustments you had recommended in&amp;nbsp; your latest jpg, and that corrected the last inconsistancy that we had.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 17:20:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299858#M111063</guid>
      <dc:creator />
      <dc:date>2012-01-25T17:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Rank function: how to get around null values in 2 dimensions, when 'Suppress when null values' doesn't work for both dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299859#M111064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this worked great for Top 5 Mix and Top 5 customers however for some reason when i select Top 10 or Top 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the below new variables were created,&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="86"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="86"&gt;eRank5 = 5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;eRank10 = 10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;eRank20 = 20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i used $(eRank5) as my variable in each calculated dimension, to select top 5 as you can see in the attached QVW it works for MIX and for Customers within each mix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i change $(eRank5) to $(eRank10) the MIX sorts correctly but the customer numbes sorts the first 5 correctly but then the next five customer numbers seem to be mixed.&amp;nbsp; This seems wierd. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 20:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Rank-function-how-to-get-around-null-values-in-2-dimensions/m-p/299859#M111064</guid>
      <dc:creator />
      <dc:date>2012-01-30T20:34:18Z</dc:date>
    </item>
  </channel>
</rss>

