<?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 Variable for current month end in previous year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-for-current-month-end-in-previous-year/m-p/762840#M271231</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 tried to create a variable to show the date for the end of the current month in the previous year to do some YOY YTD analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the variable: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;date(YearEnd(today(),-1,(month(today())+1)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears to work i.e. my result is currently 30/11/2013. However, it doesn't seem to&amp;nbsp; to work in my expression, which is designed to pick up all data for 2013 from Jan to Nov. Instead I get Jan 2013 up to my latest data in 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SUM({$&amp;lt;[Type]&amp;nbsp; = {'Actual*'}, [applieddate_ReportDate] =&amp;nbsp; {"&amp;gt;=$(vDateYearStartLess1)"},[Date] = {"&amp;lt;=$(vDateCurrentMonthEndYearLess1)"}&amp;gt;}Value)/1000&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Does anyone have any tips? I am new to Qlikview so any help would be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Nov 2014 17:57:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-17T17:57:28Z</dc:date>
    <item>
      <title>Variable for current month end in previous year</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-for-current-month-end-in-previous-year/m-p/762840#M271231</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 tried to create a variable to show the date for the end of the current month in the previous year to do some YOY YTD analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the variable: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;date(YearEnd(today(),-1,(month(today())+1)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears to work i.e. my result is currently 30/11/2013. However, it doesn't seem to&amp;nbsp; to work in my expression, which is designed to pick up all data for 2013 from Jan to Nov. Instead I get Jan 2013 up to my latest data in 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SUM({$&amp;lt;[Type]&amp;nbsp; = {'Actual*'}, [applieddate_ReportDate] =&amp;nbsp; {"&amp;gt;=$(vDateYearStartLess1)"},[Date] = {"&amp;lt;=$(vDateCurrentMonthEndYearLess1)"}&amp;gt;}Value)/1000&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Does anyone have any tips? I am new to Qlikview so any help would be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 17:57:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-for-current-month-end-in-previous-year/m-p/762840#M271231</guid>
      <dc:creator />
      <dc:date>2014-11-17T17:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Variable for current month end in previous year</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-for-current-month-end-in-previous-year/m-p/762841#M271232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Leanne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure which of your dates you're using to filter here - applieddate_ReportDae or Date. However the principle is the same regardless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your criteria should be something like&lt;/P&gt;&lt;P&gt;Date={"&amp;gt;=$(vDateYearStartLess1)&amp;lt;=YearEnd&amp;lt;=$(vDateCurrentMonthEndYearLess1)"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the &amp;gt;= and &amp;lt;= should be in the same search string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 18:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-for-current-month-end-in-previous-year/m-p/762841#M271232</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2014-11-17T18:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Variable for current month end in previous year</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-for-current-month-end-in-previous-year/m-p/762842#M271233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first you need to make sure &lt;/P&gt;&lt;P&gt;the format of the variable is the same as the field &lt;/P&gt;&lt;P&gt;second you used one date field to use the start of last year and another field to determine the end of last year&lt;/P&gt;&lt;P&gt;usually you use the same field in your case may be something like &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;SUM({$&amp;lt;[Type]&amp;nbsp; = {'Actual*'}, [applieddate_ReportDate] =&amp;nbsp; {"&amp;gt;=$(vDateYearStartLess1)&amp;nbsp; &lt;EM style="color: #3d3d3d; font-family: inherit; font-weight: inherit;"&gt;&amp;lt;=$(vDateCurrentMonthEndYearLess1)&lt;/EM&gt; "}&amp;gt;}Value)/1000&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;third there is a much simpler function to find previous year end of the month&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;you can use monthend(addmonths(today(),-12)) &lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 18:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-for-current-month-end-in-previous-year/m-p/762842#M271233</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2014-11-17T18:09:45Z</dc:date>
    </item>
  </channel>
</rss>

