<?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: Two ranking in straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515977#M750671</link>
    <description>&lt;P&gt;what is your source data?&lt;/P&gt;&lt;P&gt;if you have a field for week you Need to use set Analysis&lt;/P&gt;&lt;P&gt;rank(sum({&amp;lt;yourweekfield={'$(=yourweekfield-1)'}&amp;gt;}Sales) (with Dimension of your products)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Dec 2018 08:06:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-12-04T08:06:59Z</dc:date>
    <item>
      <title>Two ranking in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515969#M750670</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;I need help to solve a problem. I have a set of sales data, and I would need to calculate the sales ranking by product in the current week and the previous week in a straight table.&lt;/P&gt;&lt;P&gt;I can get the ranking of the current week with a RowNo (Total) but I can not calculate the ranking of the previous week simultaneously&lt;/P&gt;&lt;P&gt;Attached excel with the result to obtain.&lt;/P&gt;&lt;P&gt;Thanks to everyone.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515969#M750670</guid>
      <dc:creator>PabloOrtiz</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Two ranking in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515977#M750671</link>
      <description>&lt;P&gt;what is your source data?&lt;/P&gt;&lt;P&gt;if you have a field for week you Need to use set Analysis&lt;/P&gt;&lt;P&gt;rank(sum({&amp;lt;yourweekfield={'$(=yourweekfield-1)'}&amp;gt;}Sales) (with Dimension of your products)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 08:06:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515977#M750671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-04T08:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Two ranking in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515989#M750672</link>
      <description>&lt;P&gt;The source data is like this&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 08:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515989#M750672</guid>
      <dc:creator>PabloOrtiz</dc:creator>
      <dc:date>2018-12-04T08:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Two ranking in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515998#M750673</link>
      <description>&lt;P&gt;you Need to define 4 expressions&lt;/P&gt;&lt;P&gt;As I do not know if you have a selection fiield for your week, I defined max(week) and max (Week-1). you may adapt it to your purposes. I cannot upload my little example&lt;/P&gt;&lt;P&gt;Dimension: Products&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Expr1: =&lt;FONT color="#0000ff"&gt;rank&lt;/FONT&gt;(&lt;FONT color="#0000ff"&gt;sum&lt;/FONT&gt;({&amp;lt;&lt;FONT color="#800000"&gt;Week&lt;/FONT&gt;={'$(=max(Week))'}&amp;gt;}&lt;FONT color="#800000"&gt;Val&lt;/FONT&gt;))&lt;BR /&gt;Expr 2: =&lt;FONT color="#0000ff"&gt;sum&lt;/FONT&gt;({&amp;lt;&lt;FONT color="#800000"&gt;Week&lt;/FONT&gt;={'$(=max(Week))'}&amp;gt;}&lt;FONT color="#800000"&gt;Val&lt;/FONT&gt;)&lt;BR /&gt;Expr 3: =&lt;FONT color="#0000ff"&gt;rank&lt;/FONT&gt;(&lt;FONT color="#0000ff"&gt;sum&lt;/FONT&gt;({&amp;lt;&lt;FONT color="#800000"&gt;Week&lt;/FONT&gt;={'$(=max(Week)-1)'}&amp;gt;}&lt;FONT color="#800000"&gt;Val&lt;/FONT&gt;))&lt;BR /&gt;Expr 4: =&lt;FONT color="#0000ff"&gt;sum&lt;/FONT&gt;({&amp;lt;&lt;FONT color="#800000"&gt;Week&lt;/FONT&gt;={'$(=max(Week)-1)'}&amp;gt;}&lt;FONT color="#800000"&gt;Val&lt;/FONT&gt;) &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 08:41:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1515998#M750673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-04T08:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Two ranking in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1516001#M750674</link>
      <description>&lt;P&gt;Hi, thank you very much, just what I needed.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 08:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1516001#M750674</guid>
      <dc:creator>PabloOrtiz</dc:creator>
      <dc:date>2018-12-04T08:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Two ranking in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1516071#M750675</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You're current solution doesn't cover movement from year to year.&lt;/P&gt;&lt;P&gt;Weeks can be tricky.&lt;/P&gt;&lt;P&gt;Use variable for max week as num(weekstart(yourdate)) and max week -1 as vMaxWeek-7&lt;/P&gt;&lt;P&gt;This will allow you check from week 1 in 2018 against last week in 2017 for example&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;*,&lt;BR /&gt;year(date) as year,&lt;BR /&gt;Month(date) as month,&lt;BR /&gt;week(date) as week,&lt;BR /&gt;num(weekstart(date)) as weeknum;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;date, qty&lt;BR /&gt;15/12/2017, 1&lt;BR /&gt;24/12/2017, 2&lt;BR /&gt;29/12/2017, 3&lt;BR /&gt;04/01/2018, 4&lt;BR /&gt;13/01/2018, 5&lt;BR /&gt;24/01/2018, 6&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 10:21:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1516071#M750675</guid>
      <dc:creator>bismart</dc:creator>
      <dc:date>2018-12-04T10:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Two ranking in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1516084#M750676</link>
      <description>&lt;P&gt;Hi, thank you very much, I will keep it in mind.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 10:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-ranking-in-straight-table/m-p/1516084#M750676</guid>
      <dc:creator>PabloOrtiz</dc:creator>
      <dc:date>2018-12-04T10:40:40Z</dc:date>
    </item>
  </channel>
</rss>

