<?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: Sales Last / Previous Week in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931291#M321946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis will not help in a row-by-row expression such as previous week. A set expression is evaluated once for the table and not on a row by row basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at Above() or Below() chart functions if you want to do this in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, a straight table&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dimension: WeekY&lt;/LI&gt;&lt;LI&gt;Expression1: your existing expression for current portfolio&lt;/LI&gt;&lt;LI&gt;Expression2: =Below(Column(1))&amp;nbsp;&amp;nbsp;&amp;nbsp; for previous portfolio&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Sep 2015 07:58:42 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2015-09-11T07:58:42Z</dc:date>
    <item>
      <title>Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931287#M321942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need an comparisation between Sales current week vs last week. But I need the possibility to select a week so the function above or below doesn't work. Here is my Sales table;&lt;/P&gt;&lt;P&gt;What is the proper set analysis for getting the previous record?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls advice &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 385px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;WeekY&lt;/TD&gt;&lt;TD class="xl64" width="141"&gt;Previous Orderportfolio&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="146"&gt;Current Orderportfolio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/37&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.363.248&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.854.268&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/36&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.038.389&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.363.248&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/35&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.025.413&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.038.389&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/34&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.373.356&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.025.413&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/33&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.319.992&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.373.356&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/32&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;6.876.961&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.319.992&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/31&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.009.264&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;6.876.961&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015/30&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;6.666.926&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7.009.264&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 07:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931287#M321942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-11T07:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931288#M321943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems like already aggregated (expected) data, can you share raw data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 07:41:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931288#M321943</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-11T07:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931289#M321944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, sum of &lt;/P&gt;&lt;P&gt;but it's just what i did in Excel. Now i need a set analysis to reproduce the same data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you use this as sample data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 07:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931289#M321944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-11T07:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931290#M321945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have two columns in your database for Current and Previous period? or is it just one column and this is a kind of display you want to create?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 07:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931290#M321945</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-11T07:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931291#M321946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis will not help in a row-by-row expression such as previous week. A set expression is evaluated once for the table and not on a row by row basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at Above() or Below() chart functions if you want to do this in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, a straight table&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dimension: WeekY&lt;/LI&gt;&lt;LI&gt;Expression1: your existing expression for current portfolio&lt;/LI&gt;&lt;LI&gt;Expression2: =Below(Column(1))&amp;nbsp;&amp;nbsp;&amp;nbsp; for previous portfolio&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 07:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931291#M321946</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-11T07:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931292#M321947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, correct.&lt;/P&gt;&lt;P&gt;It's just one column (Sales) with the value. Previous is the calculation i need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 08:05:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931292#M321947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-11T08:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931293#M321948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply. &lt;/P&gt;&lt;P&gt;If i use the functions,I cannot select a certain week (like wk 2015/35), because this will show me zero for previous. column. Logic because I do not have a below or above records...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 08:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931293#M321948</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-11T08:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931294#M321949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;t1:&lt;/P&gt;&lt;P&gt;load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;WeekY,Current Orderportfolio&lt;/P&gt;&lt;P&gt;2015/37,7.854.268&lt;/P&gt;&lt;P&gt;2015/36,7.363.248&lt;/P&gt;&lt;P&gt;2015/35,7.038.389&lt;/P&gt;&lt;P&gt;2015/34,7.025.413&lt;/P&gt;&lt;P&gt;2015/33,7.373.356&lt;/P&gt;&lt;P&gt;2015/32,7.319.992&lt;/P&gt;&lt;P&gt;2015/31,6.876.961&lt;/P&gt;&lt;P&gt;2015/30,7.009.264&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;t2:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;WeekY,[Current Orderportfolio],if (isnull(Peek([Current Orderportfolio])),0,Peek([Current Orderportfolio])) as [Previous Orderportfolio]&lt;/P&gt;&lt;P&gt; Resident t1 order by WeekY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; drop Table t1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 08:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931294#M321949</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-11T08:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Last / Previous Week</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931295#M321950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Rand() * 100000 as Value;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Year(Today() - RecNo()) &amp;amp; '/' &amp;amp; Week(Today()-RecNo()) as YearWeek,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(Today() - RecNo()) as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Year(Today() - RecNo()) as Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 618;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How it looks in Table Box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/98623_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Straight Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: YearWeek&lt;/P&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;1) 2015: &lt;STRONG&gt;=Sum({&amp;lt;Date = {"$(='&amp;gt;=' &amp;amp; Date(YearStart(Max(Date))) &amp;amp; '&amp;lt;=' &amp;amp; Date(Max(Date)))"}&amp;gt;}Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2) 2014: &lt;STRONG&gt;=If(Sum({&amp;lt;Date = {"$(='&amp;gt;=' &amp;amp; Date(YearStart(Max(Date))) &amp;amp; '&amp;lt;=' &amp;amp; Date(Max(Date)))"}&amp;gt;}Value) &amp;gt; 0, Above(Sum({&amp;lt;Date = , YearWeek = &amp;gt;}Value), 52))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With no selection:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/98627_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;With Selections:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/98628_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I hope this is what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 08:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Last-Previous-Week/m-p/931295#M321950</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-11T08:59:05Z</dc:date>
    </item>
  </channel>
</rss>

