<?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: Sum and date on date difference in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992042#M947261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your second requirement create another straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: Team, Division, Date&lt;/P&gt;&lt;P&gt;Expression1: &lt;STRONG&gt;Goals&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Expression2: &lt;STRONG&gt;=Goals - Above(Goals)&lt;/STRONG&gt;&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/110043_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Dec 2015 15:28:41 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-12-28T15:28:41Z</dc:date>
    <item>
      <title>Sum and date on date difference</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992040#M947259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have table that looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" height="160" src="https://community.qlik.com/legacyfs/online/110028_Capture.PNG" width="208" /&gt;&lt;/P&gt;&lt;P&gt;I am trying to sum up the goals that each team scored on the latest date (max date). I've created a variable&lt;/P&gt;&lt;P&gt;vMaxDate = (Date(Max(Date)),Team). I've tried 2 expressions and it keeps selecting the largest goals scored. These are my expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(aggr(SUM(if(Date=$(=vMaxDate), Goals,0)),Team))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(if(Date=$(=vMaxDate), Goals,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want my output to look like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.PNG" class="jive-image image-1" height="93" src="https://community.qlik.com/legacyfs/online/110029_Capture2.PNG" width="180" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I also need to calculate a sequential difference based on the date i.e. :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture3.PNG" class="jive-image image-1" height="161" src="https://community.qlik.com/legacyfs/online/110035_Capture3.PNG" width="312" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 13:20:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992040#M947259</guid>
      <dc:creator />
      <dc:date>2015-12-28T13:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and date on date difference</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992041#M947260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this in a straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&lt;STRONG&gt; Team&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Expression1: &lt;STRONG&gt;=Date(Max(Date))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Expression2: &lt;STRONG&gt;=FirstSortedValue(Aggr(Sum(Goals), Team, Date), -Aggr(Date, Team, Date))&lt;/STRONG&gt;&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/110042_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992041#M947260</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-28T15:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and date on date difference</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992042#M947261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your second requirement create another straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: Team, Division, Date&lt;/P&gt;&lt;P&gt;Expression1: &lt;STRONG&gt;Goals&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Expression2: &lt;STRONG&gt;=Goals - Above(Goals)&lt;/STRONG&gt;&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/110043_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992042#M947261</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-28T15:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and date on date difference</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992043#M947262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank Sunny T. Works perfectly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 06:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-date-on-date-difference/m-p/992043#M947262</guid>
      <dc:creator />
      <dc:date>2016-01-04T06:32:01Z</dc:date>
    </item>
  </channel>
</rss>

