<?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 using AddYears Function for Date Formatted MMDDYYYY in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834192#M532526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I updated your expression as follows and it worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;[POS Date]={"$(=Date(AddYears(Date(Max([POS Date])),-1)))"}&amp;gt;}[POS Adjusted Fair Value])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2015 15:34:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-27T15:34:03Z</dc:date>
    <item>
      <title>Sum using AddYears Function for Date Formatted MMDDYYYY</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834189#M532523</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 having difficulties with the AddYears function just when I though I had figured it out and was working.&amp;nbsp; I loaded my data setting the date format as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET DateFormat='MM/DD/YYYY';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to sum a value for a specific column based on the value for 1 year prior to the max year in the table using the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;[POS Date]={"$(=Num(AddYears(Date(Max([POS Date],'MMDDYYYY')),-1)))"}&amp;gt;}[POS Adjusted Fair Value])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At one point this was functioning, however when I reloaded my updated data something changed.&amp;nbsp; Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 15:21:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834189#M532523</guid>
      <dc:creator />
      <dc:date>2015-04-27T15:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sum using AddYears Function for Date Formatted MMDDYYYY</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834190#M532524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this (Assuming your [POS Date] is a number formatted field&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;&lt;STRONG&gt;=Sum({$&amp;lt;[POS Date]={"$(=Num(AddYears(Date(Max([POS Date])),-1)))"}&amp;gt;}[POS Adjusted Fair Value])&lt;/STRONG&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;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&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;Best,&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;Sunny&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 15:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834190#M532524</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-27T15:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sum using AddYears Function for Date Formatted MMDDYYYY</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834191#M532525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is actually formatted as a Date 'MMDDYYYY". &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 15:33:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834191#M532525</guid>
      <dc:creator />
      <dc:date>2015-04-27T15:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sum using AddYears Function for Date Formatted MMDDYYYY</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834192#M532526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I updated your expression as follows and it worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;[POS Date]={"$(=Date(AddYears(Date(Max([POS Date])),-1)))"}&amp;gt;}[POS Adjusted Fair Value])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 15:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834192#M532526</guid>
      <dc:creator />
      <dc:date>2015-04-27T15:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum using AddYears Function for Date Formatted MMDDYYYY</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834193#M532527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am glad it worked for you Jeff. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&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>Mon, 27 Apr 2015 15:39:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-using-AddYears-Function-for-Date-Formatted-MMDDYYYY/m-p/834193#M532527</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-27T15:39:52Z</dc:date>
    </item>
  </channel>
</rss>

