<?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 for Calculated Expression in Straight Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75891#M787935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked perfectly - thanks so much for the quick response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas about #3?&amp;nbsp; I need to incorporate the time element (month) to figure how the Rank has changed since the last month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like: &lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &amp;lt;= (max(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) - 1)), rank(TOTAL (count (DISTINCT (odino) ) / (veh_vol)) * 1,000) - rank(TOTAL (count(DISTINCT(odino)) / (veh_vol))*1000), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Noelle&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Feb 2018 22:24:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-22T22:24:16Z</dc:date>
    <item>
      <title>Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75889#M787933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a project where I have set up a straight table that has two dimensions (newmodeltxt and yeartxt) and numerous calculated expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do several things here:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. Calculate the Complaint Rate = &lt;SPAN style="font-size: 10pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;odino&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))) / (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;veh_vol&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))*1000.&amp;nbsp; This looks good.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; 2. Calculate the &lt;/SPAN&gt;Rank of the Complaint Rate.&amp;nbsp; I want this calculation to be regardless of any other columns in the table... just a straight sorting of this Complaint Rate column.&amp;nbsp; In other words, I want to see the highest value of Complaint Rate to be at the top of my table and the lowest value to be at the bottom.&amp;nbsp; Everything I've tried seems to continue to group by the two dimensions (newmodeltxt and yeartxt)&lt;/P&gt;&lt;P&gt;&amp;nbsp; 3. Calculate the change in Rank from the previous month (i.e. using the Month variable to calculate the difference between Rank for the entire time frame, and Rank for the time frame - the most recent month).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone offer any help with respect to #2 and 3?&amp;nbsp; Sample file attached:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Noelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75889#M787933</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75890#M787934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe just use the TOTAL qualifier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=rank(TOTAL (count(DISTINCT(odino)) / (veh_vol))*1000)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 22:10:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75890#M787934</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-02-22T22:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75891#M787935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked perfectly - thanks so much for the quick response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas about #3?&amp;nbsp; I need to incorporate the time element (month) to figure how the Rank has changed since the last month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like: &lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &amp;lt;= (max(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) - 1)), rank(TOTAL (count (DISTINCT (odino) ) / (veh_vol)) * 1,000) - rank(TOTAL (count(DISTINCT(odino)) / (veh_vol))*1000), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Noelle&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 22:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75891#M787935</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-22T22:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75892#M787936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite sure I understand. How would your table look like with the given requirement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 22:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75892#M787936</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-02-22T22:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75893#M787937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking for the left-most column to show the current Rank (your solution above worked for this) and the right-most column to show the change in Rank. Like for sports teams, when you show if they rose or dropped since the last weeks rankings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the Month variable which I hope to use to calculate (Rank during previous month) - (Rank for current month) = change in Rank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - Noelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 22:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75893#M787937</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-22T22:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75894#M787938</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;Let me try explaining once more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the left-most column, I need the overall Rank calculated based on all of the data, which comes from the formula you provided yesterday - thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the right-most column, I need the Rank Change.&amp;nbsp; This is a monthly report, and each row of data has an associated date.&amp;nbsp; I need to calculate the rank based on all the data excluding the most recent month's data; i.e. where Month = max(Month).&amp;nbsp; In other words, the overall Rank from the previous monthly report.&amp;nbsp; I could then subtract The Overall Ranking from the Previous Month Ranking to find the change in rank from the previous month to this month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas would be greatly appreciate.&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; Noelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 11:19:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75894#M787938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T11:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75895#M787939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QlikView community -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Circling back to this thread to see if anyone else has any ideas about calculating the Rank for a subset of the data (ignoring the most recent month).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Noelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 20:20:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75895#M787939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T20:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Rank for Calculated Expression in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75896#M787940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noelle, &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;Like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Ranks.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/195151_Ranks.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I use this expression&lt;/P&gt;&lt;P&gt;Rkn:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank(if(Count(distinct &lt;STRONG&gt;New_Corp&lt;/STRONG&gt;)=1,$&lt;STRONG&gt;(MAT_ACT&lt;/STRONG&gt;)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rkn2: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank(if(Count(distinct &lt;STRONG&gt;New_Corp&lt;/STRONG&gt;)=1,$(&lt;STRONG&gt;MAT_PY&lt;/STRONG&gt;)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the 3rd column is the difference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank(if(Count(distinct &lt;STRONG&gt;New_Corp&lt;/STRONG&gt;)=1,$(&lt;STRONG&gt;MAT_PY&lt;/STRONG&gt;)))-Rank(if(Count(distinct &lt;STRONG&gt;New_Corp&lt;/STRONG&gt;)=1,$&lt;STRONG&gt;(MAT_ACT&lt;/STRONG&gt;)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &lt;STRONG&gt;MAT_ACT&lt;/STRONG&gt; is my variable for the current period&lt;/P&gt;&lt;P&gt;Where &lt;STRONG&gt;MAT_PY&lt;/STRONG&gt; is my variable for the current period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;STRONG&gt;New_Corp&lt;/STRONG&gt; the dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2018 14:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-for-Calculated-Expression-in-Straight-Table/m-p/75896#M787940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-02T14:45:30Z</dc:date>
    </item>
  </channel>
</rss>

