<?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 pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736199#M263414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. My question wasn't clear, apologies for that. I'm using the following SA to return the number 1 ranked Template ID based on each template's conversion ratio [Sum(&amp;nbsp; _f_OK_SIGNUP)/Sum( [Visit Counter])]:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only({&amp;lt;[Template ID]={'=rank(Sum(&amp;nbsp; _f_OK_SIGNUP)/Sum( [Visit Counter]),0,1)=1'}&amp;gt;} TOTAL [Template ID]) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I use the SA in a pivot table with two dimensions, Merchant and Country, it's returning the overall best template and I need it to return the best template per merchant. If I make a selection on merchant, the right template is returned, however I need&amp;nbsp; it to work without selecting the merchant and am unclear as how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry again for not being clearer in the beginning. Hopefully you can point me in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jul 2014 13:37:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-09T13:37:07Z</dc:date>
    <item>
      <title>aggr rank pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736195#M263410</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'm trying to use aggr and rank together in a pivot table to return a ranking relative to the two dimensions in my pivot table, Dim1 and Dim2. Here's what I'm using now:&lt;/P&gt;&lt;P&gt;=aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp; rank(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum( {&amp;lt;[Hit Action] = {"Join Page"} &amp;gt;}&amp;nbsp; _f_OK_SIGNUP)/Sum( {&amp;lt;[Hit Action] = {"Join Page"} &amp;gt;}&amp;nbsp; [Visit Counter])&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,0,1)&lt;/P&gt;&lt;P&gt;,[Dim1],[Dim2])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the aggr, it returns a rank overall all the records. I need to return a rank based on Dim1 and Dim2. Can anyone see the mistake I'm making?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 20:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736195#M263410</guid>
      <dc:creator />
      <dc:date>2014-07-08T20:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: aggr rank pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736196#M263411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want the ranking to reflect the ranking of Dim2 within Dim1? Or the overall ranking of the Dim1/Dim2 value within all combinations? I'm going to guess overall ranking. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Dim1 and Dim2 are the only dimensions in your table, then I think you just need: (I've omitted the SA for convenience, add it back in).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;rank(Sum(TOTAL &lt;SPAN style="color: #3d3d3d;"&gt; [Visit Counter])&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No aggr needed. If there are other Dimensions in your chart, you will need the aggr().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;aggr(NODISTINCT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;rank(TOTAL sum(Expression1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;,Dim1, Dim2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 21:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736196#M263411</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-07-08T21:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: aggr rank pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736197#M263412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. Regarding your question, I'd like the&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; to reflect the ranking of Dim2 within Dim1. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will review and test your expressions shortly and get back to the thread. If you have anything else to add re the raning of Dim2 within Dim1 please do.&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;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 22:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736197#M263412</guid>
      <dc:creator />
      <dc:date>2014-07-08T22:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: aggr rank pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736198#M263413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dim2 with Dim1. Same answers above except remove the TOTAL qualifier. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 22:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736198#M263413</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-07-08T22:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: aggr rank pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736199#M263414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. My question wasn't clear, apologies for that. I'm using the following SA to return the number 1 ranked Template ID based on each template's conversion ratio [Sum(&amp;nbsp; _f_OK_SIGNUP)/Sum( [Visit Counter])]:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only({&amp;lt;[Template ID]={'=rank(Sum(&amp;nbsp; _f_OK_SIGNUP)/Sum( [Visit Counter]),0,1)=1'}&amp;gt;} TOTAL [Template ID]) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I use the SA in a pivot table with two dimensions, Merchant and Country, it's returning the overall best template and I need it to return the best template per merchant. If I make a selection on merchant, the right template is returned, however I need&amp;nbsp; it to work without selecting the merchant and am unclear as how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry again for not being clearer in the beginning. Hopefully you can point me in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 13:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736199#M263414</guid>
      <dc:creator />
      <dc:date>2014-07-09T13:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: aggr rank pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736200#M263415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ohhh...that's completely different!. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis is evaluated only once for the chart. It is dimensionless. You will need to use an if() instead. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;rank(TOTAL&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Country&lt;/SPAN&gt;&amp;gt; Sum(&amp;nbsp; _f_OK_SIGNUP)/Sum( [Visit Counter]),0,1)=1, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Template ID]&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not totally tested, but you get the idea. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 18:22:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-rank-pivot-table/m-p/736200#M263415</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-07-09T18:22:04Z</dc:date>
    </item>
  </channel>
</rss>

