<?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 Offsetting Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262607#M1203733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was trying to get YTD for the previous year, but I want YTD of last year less one day.&lt;/P&gt;&lt;P&gt;If i were to go into my document today, my YTD data is up to June 17, 2010 .&lt;/P&gt;&lt;P&gt;I want my expression to give me comparison of YTD up to June 17, 2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jun 2010 19:35:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-06-18T19:35:15Z</dc:date>
    <item>
      <title>Offsetting Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262605#M1203731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do a comparison of this year sales to last year sales, YTD,&lt;/P&gt;&lt;P&gt;My data however gets generated over night to include up to the previous days sales.&lt;/P&gt;&lt;P&gt;So if comparing to last year to date, I have to offset the results by one day. I came up with this expression but I am convinced it is not right,&lt;/P&gt;&lt;P&gt;sum(if(yeartodate([INVC DATE]-1,-1), [TOT SALES])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 19:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262605#M1203731</guid>
      <dc:creator />
      <dc:date>2010-06-18T19:08:54Z</dc:date>
    </item>
    <item>
      <title>Offsetting Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262606#M1203732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, it´s not ritght : )&lt;/P&gt;&lt;P&gt;This expression offset is set in years, so its returning the ytd sales for the last year!&lt;/P&gt;&lt;P&gt;You can make calculations with dates like integers:&lt;/P&gt;&lt;P&gt;sum(if(inYearToDate(Sales_Date, (today()-1) ,0), Value)&lt;/P&gt;&lt;P&gt;For expressions that needs an offset of weeks, months there is a group of functions (addmonth(), addyear(),etc) that does the job!&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 19:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262606#M1203732</guid>
      <dc:creator>fernandotoledo</dc:creator>
      <dc:date>2010-06-18T19:28:53Z</dc:date>
    </item>
    <item>
      <title>Offsetting Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262607#M1203733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was trying to get YTD for the previous year, but I want YTD of last year less one day.&lt;/P&gt;&lt;P&gt;If i were to go into my document today, my YTD data is up to June 17, 2010 .&lt;/P&gt;&lt;P&gt;I want my expression to give me comparison of YTD up to June 17, 2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 19:35:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262607#M1203733</guid>
      <dc:creator />
      <dc:date>2010-06-18T19:35:15Z</dc:date>
    </item>
    <item>
      <title>Offsetting Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262608#M1203734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you can combine the expressions:&lt;/P&gt;&lt;P&gt;Today()-1 =&amp;gt; Previous day&lt;/P&gt;&lt;P&gt;inYearToDate(...,..., -1) =&amp;gt; Previous Year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 19:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262608#M1203734</guid>
      <dc:creator>fernandotoledo</dc:creator>
      <dc:date>2010-06-18T19:40:04Z</dc:date>
    </item>
    <item>
      <title>Offsetting Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262609#M1203735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok and to take it one step further, if i want month to date of last year less one day, what should my expression look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 19:49:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262609#M1203735</guid>
      <dc:creator />
      <dc:date>2010-06-18T19:49:58Z</dc:date>
    </item>
    <item>
      <title>Offsetting Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262610#M1203736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have a bunch of Date &amp;amp; Time functions! In this case it would be the InMonthToDate() wich works like the year to date one.&lt;/P&gt;&lt;P&gt;It´s worth to look for 'Date and time' in the help to see them all!&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 20:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Offsetting-Dates/m-p/262610#M1203736</guid>
      <dc:creator>fernandotoledo</dc:creator>
      <dc:date>2010-06-18T20:03:12Z</dc:date>
    </item>
  </channel>
</rss>

