<?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: Previous year to date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231866#M859955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;P&gt;You pointed me in the right direction and I made a slight amendment and it now works. The expression is&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LinkId]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"FIN"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"REBATE"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=YearStart(Today(),-1))&amp;lt;$(=MonthEnd(addyears(today(-1),-1)))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&lt;BR /&gt; &amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Only issue I may have is that the application updates at 1 am on the first of the month. Will the monthend then be Feb or Jan,? I guess Feb, how do I trim a day and a year off?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jan 2017 13:42:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-01-25T13:42:10Z</dc:date>
    <item>
      <title>Previous year to date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231864#M859953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been asked to build a report that details the sales for each month for the current year and the sales amount for the same month of the previous this will build over the year and then start again in 2018 showing all of 2017. For example the report will be scheduled for the 1st Feb 2107 and this will show all of January 2017 and also January 2016.&lt;/P&gt;&lt;P&gt;Basically I am looking for previous year to date total. Show when the report run in March it will show me all of January and February 2016 sales in one column&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; My expression is&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LinkId]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"FIN"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"REBATE"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=MonthEnd(addyears(today(),-1)))&amp;gt;=$(yearstart(addyears(today(),-1)))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&lt;BR /&gt; &amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;This unfortunately returns records prior to Jan 2016.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;I have split the bill date code and put it on the report as an object and it returns 01/01/2016 and 31/01/2016.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;This will be scheduled on the 1st of every month. The data refreshes every night so on the 1st of each month it will only hold the data for the last day of the month so I don't see why my expression wont work. Any help would be gratefully received&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231864#M859953</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year to date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231865#M859954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[LinkId] = {"FIN"}, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Bill Code]-={"REBATE"},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Bill Date]&amp;nbsp; = &lt;SPAN style="color: #ff0000;"&gt;{"&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;=$(=YearStart(Today(),-1))&lt;/SPAN&gt;&amp;lt;$(=MonthStart(Today()))"}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;gt;}[Bill Value])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a specific Date Format, you might need to add Date() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Sum({$&amp;lt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[LinkId] = {"FIN"}, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Bill Code]-={"REBATE"},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Bill Date]&amp;nbsp; = &lt;SPAN style="color: #ff0000;"&gt;{"&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;=$(=Date(YearStart(Today(),-1), 'DateFieldFormatHere'))&lt;/SPAN&gt;&amp;lt;$(=Date(MonthStart(Today())&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;, 'DateFieldFormatHere')&lt;/STRONG&gt;)"}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;gt;}[Bill Value])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 11:56:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231865#M859954</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-25T11:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year to date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231866#M859955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;P&gt;You pointed me in the right direction and I made a slight amendment and it now works. The expression is&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LinkId]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"FIN"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"REBATE"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=YearStart(Today(),-1))&amp;lt;$(=MonthEnd(addyears(today(-1),-1)))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&lt;BR /&gt; &amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bill Value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Only issue I may have is that the application updates at 1 am on the first of the month. Will the monthend then be Feb or Jan,? I guess Feb, how do I trim a day and a year off?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 13:42:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231866#M859955</guid>
      <dc:creator />
      <dc:date>2017-01-25T13:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year to date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231867#M859956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if it is&lt;/P&gt;&lt;P&gt;Feb 1st 2017, you want to see Jan 1st 2016 till Jan 31th 2016, right?&lt;/P&gt;&lt;P&gt;Mar 1st 2017, you want to see Jan 1st 2016 till Feb 29th 2016?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;&lt;BR /&gt;[LinkId] = {"FIN"}, &lt;BR /&gt;[Bill Code]-={"REBATE"},&lt;BR /&gt;[Bill Date]&amp;nbsp; = {"&amp;gt;=$(=YearStart(Today(),-1))&amp;lt;$(=&lt;STRONG&gt;MonthStart&lt;/STRONG&gt;(AddYears(Today(),-1)))"}&lt;BR /&gt;&amp;gt;}[Bill Value])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:00:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231867#M859956</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-25T14:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year to date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231868#M859957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to test this before month end is there anyway I change the system date from today to 1st Feb or can you show me how I can alter the query to kid it into thinking today is the 1st Feb&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 15:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231868#M859957</guid>
      <dc:creator />
      <dc:date>2017-01-25T15:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year to date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231869#M859958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Today() +&amp;nbsp; 7 should give you Feb 1st, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&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;&lt;STRONG&gt;Sum({$&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[LinkId] = {"FIN"}, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Bill Code]-={"REBATE"},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Bill Date]&amp;nbsp; = {"&amp;gt;=$(=YearStart(&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;Today() +&amp;nbsp; 7&lt;/SPAN&gt;,-1))&amp;lt;$(=&lt;/SPAN&gt;MonthStart&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(AddYears(&lt;STRONG style=": ; color: #ff0000; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Today() +&amp;nbsp; 7&lt;/STRONG&gt;,-1)))"}&lt;/SPAN&gt;&lt;/STRONG&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;&amp;gt;}[Bill Value])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 15:40:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-to-date/m-p/1231869#M859958</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-25T15:40:38Z</dc:date>
    </item>
  </channel>
</rss>

