<?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 InYearToDate function gives wrong values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/InYearToDate-function-gives-wrong-values/m-p/149615#M27769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a really strange problem with the InYearToDate function. Given the following situation:&lt;/P&gt;&lt;P&gt;LET vCurrentDate = '31-03-2008 23:59:59';&lt;/P&gt;&lt;P&gt;When I do a sum(Sales) over the year 2008 (jan, feb, mar) I get as result: € 257.203,00 which is right.&lt;/P&gt;&lt;P&gt;When I do a sum(Sales) over the year 2007 (jan, feb, mar) I get as result: € 243.214,00 which is also right.&lt;/P&gt;&lt;P&gt;Next thing I want to do is a YearToDate function to compare with 2007 (jan, feb, mar). To sum 2007 and 2008 sales I use the following syntax:&lt;/P&gt;&lt;P&gt;to sum 2008:&lt;/P&gt;&lt;P&gt;Sum({1} IF(InYearToDate (Date, vCurrentDate , -0), Sales))&lt;/P&gt;&lt;P&gt;to sum 2007:&lt;/P&gt;&lt;P&gt;Sum({1} IF(InYearToDate (Date, vCurrentDate , -0), Sales))&lt;/P&gt;&lt;P&gt;The values I get back from those two functions are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;2007: 246.031&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;2008 514.215&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I really don't know what's going wrong.. any sugestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2009 19:10:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-17T19:10:52Z</dc:date>
    <item>
      <title>InYearToDate function gives wrong values</title>
      <link>https://community.qlik.com/t5/QlikView/InYearToDate-function-gives-wrong-values/m-p/149615#M27769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a really strange problem with the InYearToDate function. Given the following situation:&lt;/P&gt;&lt;P&gt;LET vCurrentDate = '31-03-2008 23:59:59';&lt;/P&gt;&lt;P&gt;When I do a sum(Sales) over the year 2008 (jan, feb, mar) I get as result: € 257.203,00 which is right.&lt;/P&gt;&lt;P&gt;When I do a sum(Sales) over the year 2007 (jan, feb, mar) I get as result: € 243.214,00 which is also right.&lt;/P&gt;&lt;P&gt;Next thing I want to do is a YearToDate function to compare with 2007 (jan, feb, mar). To sum 2007 and 2008 sales I use the following syntax:&lt;/P&gt;&lt;P&gt;to sum 2008:&lt;/P&gt;&lt;P&gt;Sum({1} IF(InYearToDate (Date, vCurrentDate , -0), Sales))&lt;/P&gt;&lt;P&gt;to sum 2007:&lt;/P&gt;&lt;P&gt;Sum({1} IF(InYearToDate (Date, vCurrentDate , -0), Sales))&lt;/P&gt;&lt;P&gt;The values I get back from those two functions are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;2007: 246.031&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;2008 514.215&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I really don't know what's going wrong.. any sugestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 19:10:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/InYearToDate-function-gives-wrong-values/m-p/149615#M27769</guid>
      <dc:creator />
      <dc:date>2009-07-17T19:10:52Z</dc:date>
    </item>
    <item>
      <title>InYearToDate function gives wrong values</title>
      <link>https://community.qlik.com/t5/QlikView/InYearToDate-function-gives-wrong-values/m-p/149616#M27770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course to sum 2007 should be:&lt;/P&gt;&lt;P&gt;Sum({1} IF(InYearToDate (Date, vCurrentDate , -1), Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 19:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/InYearToDate-function-gives-wrong-values/m-p/149616#M27770</guid>
      <dc:creator />
      <dc:date>2009-07-17T19:13:25Z</dc:date>
    </item>
    <item>
      <title>InYearToDate function gives wrong values</title>
      <link>https://community.qlik.com/t5/QlikView/InYearToDate-function-gives-wrong-values/m-p/149617#M27771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stupid mistake..... I forgot a field in my link table which caused the strange values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 19:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/InYearToDate-function-gives-wrong-values/m-p/149617#M27771</guid>
      <dc:creator />
      <dc:date>2009-07-17T19:27:31Z</dc:date>
    </item>
  </channel>
</rss>

