<?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: Show Last Period Value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315094#M841187</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 have try your solution,&lt;/P&gt;&lt;P&gt;It works on my sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not working on my real data, unfortunately i can't share my data, because it's confidential.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have another solution ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 May 2017 04:11:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-10T04:11:10Z</dc:date>
    <item>
      <title>Show Last Period Value</title>
      <link>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315090#M841183</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 have a problem about showing last period value in pivot table.&lt;/P&gt;&lt;P&gt;Here is my data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="262"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="34"&gt;Area&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="50"&gt;SalesID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="53"&gt;Teritory&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="48"&gt;District&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="39"&gt;Week&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="38"&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;001&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1601&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;001&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1603&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;001&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1605&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;002&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1604&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;002&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1606&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;002&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1602&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two different district. And maximum week Of District 001 is 1605, on the other side maximum week of district 002 is 1606.&lt;/P&gt;&lt;P&gt;So i want to create a pivot table like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 686px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;Area&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;SalesID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;Teritory&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="98"&gt;District&lt;/TD&gt;&lt;TD class="xl65" width="98"&gt;=sum(Value)&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="98"&gt;max(Week)&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="98"&gt;Last Week Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;001&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;37&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1605&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;002&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;22&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1606&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;District 002 shown right value (7), but district 001 return zero value (0).&lt;/P&gt;&lt;P&gt;I'm using this expression on my "Last Week Value" column : =sum({&amp;lt;Week={$(=max(Week))}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result i expect is &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 686px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="98"&gt;Area&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="98"&gt;SalesID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="98"&gt;Teritory&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="98"&gt;District&lt;/TD&gt;&lt;TD class="xl67" width="98"&gt;=sum(Value)&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="98"&gt;max(Week)&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="98"&gt;Last Week Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;001&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;37&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1605&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1122&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;01&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;002&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;22&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1606&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;7&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;Can anyone give me the solution ? I also attached my sample QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&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/Show-Last-Period-Value/m-p/1315090#M841183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Show Last Period Value</title>
      <link>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315091#M841184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But, For &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;002&lt;/SPAN&gt; you are expecting 7 or 5 ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 02:20:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315091#M841184</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-10T02:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Show Last Period Value</title>
      <link>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315092#M841185</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;For 002 i expect 7, because i want to show value on week 1606 (last week of district 002)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 02:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315092#M841185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-10T02:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Show Last Period Value</title>
      <link>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315093#M841186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, Sorry i have not read properly. May be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue(Value, Aggr(Week, Value)) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162675_Capture.PNG" style="height: 44px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 02:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315093#M841186</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-10T02:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Show Last Period Value</title>
      <link>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315094#M841187</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 have try your solution,&lt;/P&gt;&lt;P&gt;It works on my sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not working on my real data, unfortunately i can't share my data, because it's confidential.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have another solution ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 04:11:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315094#M841187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-10T04:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Show Last Period Value</title>
      <link>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315095#M841188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Atleast data need to reply. Would it possible sample data. Or&lt;/P&gt;&lt;P&gt;You may explain bit more&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 05:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-Last-Period-Value/m-p/1315095#M841188</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-10T05:27:44Z</dc:date>
    </item>
  </channel>
</rss>

