<?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 2 dates in the past in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064838#M356088</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I were to guess, Qlikview isn't interpreting your date field as an integer.&amp;nbsp;&amp;nbsp; You can include Date# in the Set Analysis or&amp;nbsp; create a Year Field in your Data Model to make the Set Analysis a little more readable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Mar 2016 21:57:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-03-01T21:57:26Z</dc:date>
    <item>
      <title>Sum 2 dates in the past</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064836#M356086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to sum a value between two dates but I would like to do it in the "past" meaning I would like to subtract 1 year from the date range once I've selected it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I have tried so far but it is not working &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Invoice Header.Order Creation Date] = {'&amp;gt;=$(=Year(Min([Invoice Header.Order Creation Date]))-1)&amp;lt;=$(=Year(Max([Date]))-1)'}&amp;gt;}[Invoice Line.Amount Including VAT])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice creation date is the start and "date" is what we call our "posting date" or the date on which the invoice was finalized. I need to sum the values between the start and end of the invoice life but for 1 year ago.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 20:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064836#M356086</guid>
      <dc:creator />
      <dc:date>2016-03-01T20:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum 2 dates in the past</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064837#M356087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post a sample application including some test data to work with.&lt;/P&gt;&lt;P&gt;Please also specify your expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 21:34:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064837#M356087</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-03-01T21:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sum 2 dates in the past</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064838#M356088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I were to guess, Qlikview isn't interpreting your date field as an integer.&amp;nbsp;&amp;nbsp; You can include Date# in the Set Analysis or&amp;nbsp; create a Year Field in your Data Model to make the Set Analysis a little more readable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 21:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064838#M356088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-01T21:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sum 2 dates in the past</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064839#M356089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not sure why you are using Year in the expression?&amp;nbsp; It just gives 2014, 2015, 2016,....&amp;nbsp; Is your date field &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Invoice Header.Order Creation Date] consists of dates or years?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If dates then use this&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({$&amp;lt;[Invoice Header.Order Creation Date] = {'&amp;gt;=$(=YearStart(Min([Invoice Header.Order Creation Date]),-1))&amp;lt;=$(=YearEnd(Max([Date]),-1))'}&amp;gt;}[Invoice Line.Amount Including VAT])&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps you.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 01:47:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064839#M356089</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-03-02T01:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sum 2 dates in the past</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064840#M356090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in both case the fields are date fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MM/DD/YYYY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Invoice Header.Order Creation Date] = 1/20/2016 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Date] = 2/15/2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want to take the range between these 2 dates and move them back exactly 1 year so the dates would be &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Invoice Header.Order Creation Date] = 1/20/2015 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date] = 2/15/2015&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Then I want to sum any records that fall within the new dates &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 15:16:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064840#M356090</guid>
      <dc:creator />
      <dc:date>2016-03-02T15:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sum 2 dates in the past</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064841#M356091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this using AddYears() for this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #edf8ca;"&gt;=Sum({$&amp;lt;[Invoice Header.Order Creation Date] = {'&amp;gt;=$(=&lt;STRONG&gt;AddYears&lt;/STRONG&gt;(Min([Invoice Header.Order Creation Date]),-1))&amp;lt;=$(=&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AddYears&lt;/STRONG&gt;(Max([Date]),-1))'}&amp;gt;}[Invoice Line.Amount Including VAT])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #edf8ca;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #edf8ca;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #edf8ca;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #edf8ca;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #edf8ca;"&gt;jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 00:29:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-2-dates-in-the-past/m-p/1064841#M356091</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-03-03T00:29:25Z</dc:date>
    </item>
  </channel>
</rss>

