<?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: Date Range Selection Compare Previous Year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365234#M618854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the below documentation link for complete set of solutions and you don't have to use complex set analysis for this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-18475"&gt;Calculation of MTD, YTD, QTD, WTD in script level - The As-Of table concept - MTD, YTD, QTD, WTD calculation made easy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can find all the necessary calculations and just download the QVW file and see my solutions. I think it will fit all your requirements. If you face any problem please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sandip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 May 2017 06:54:58 GMT</pubDate>
    <dc:creator>ananyaghosh</dc:creator>
    <dc:date>2017-05-18T06:54:58Z</dc:date>
    <item>
      <title>Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365226#M618846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope there is an easy solution for this.&amp;nbsp; But i'm having trouble creating a variable that computes the previous years selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection:&lt;/P&gt;&lt;P&gt;SHIFT_DATE &amp;gt;=01/30/2017 &amp;lt;=05/28/2017&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want a variable for the following:&lt;/P&gt;&lt;P&gt;vMaxCompareDate = 05/28/2016&lt;/P&gt;&lt;P&gt;vMinCompareDate = 01/30/2016&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to create a trend per day of previous years selection without going back and forth between selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 18:44:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365226#M618846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T18:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365227#M618847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create two variables for that&lt;/P&gt;&lt;P&gt;and then use simply&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DateField = {"&amp;gt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMinCompareDate&lt;/SPAN&gt;) &amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMaxCompareDate&lt;/SPAN&gt;)"}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;DateField = {"&amp;gt;=$(=Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMinCompareDate&lt;/SPAN&gt;)) &amp;lt;=$(=Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMaxCompareDate)&lt;/SPAN&gt;)"}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 18:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365227#M618847</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-17T18:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365228#M618848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the Problem.&amp;nbsp; I don't know how to create a variable to give me those values.&amp;nbsp; Could you give some assistance for that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 19:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365228#M618848</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T19:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365229#M618849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;Sum({&amp;lt;DateField = {"&amp;gt;=$(=AddYears(Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; text-decoration: line-through;"&gt;vMinCompareDate&lt;/SPAN&gt;)),-1) &amp;lt;=$(=AddYears(Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; text-decoration: line-through;"&gt;vMaxCompareDate)&lt;/SPAN&gt;),-1)"}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 19:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365229#M618849</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T19:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365230#M618850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are always looking at these two dates then you can hardcode in the variable OR You can use min and max or addYears or addMonths in your formula to get the desired values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/163811_Capture.PNG" style="height: 482px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 19:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365230#M618850</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2017-05-17T19:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365231#M618851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/163810_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;It is very important, that your default date format is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;SET&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;DateFormat&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;='MM/DD/YYYY'; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 19:43:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365231#M618851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T19:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365232#M618852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help so far.&amp;nbsp; My expression is returning a 0 value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my variables:&lt;/P&gt;&lt;P&gt;vMaxCompareDate: (AddYears(date(Max(SHIFT_DATE)),-1))&lt;/P&gt;&lt;P&gt;vMinCompareDate: (AddYears(date(Min(SHIFT_DATE)),-1))&lt;/P&gt;&lt;P&gt;vLaborCompareCost: Sum({&amp;lt;SHIFT_DATE = {'&amp;gt;=$(vMinCompareDate)&amp;lt;=$(vMaxCompareDate)'}&amp;gt;}Labor_Cost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is something wrong with my calculation?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vMaxCompareDate) = 05/17/2016&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vMinCompareDate) = 01/30/2016&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;$(&lt;SPAN style="font-size: 13.3333px;"&gt;vLaborCompareCost&lt;/SPAN&gt;) = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 22:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365232#M618852</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T22:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365233#M618853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you check this formula @KPI?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;SHIFT_DATE = {'&amp;gt;= $(=Min(SHIFT_DATE)) &amp;lt;=$(=Max(SHIFT_DATE))'}&amp;gt;}Labor_Cost)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 01:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365233#M618853</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-18T01:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365234#M618854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the below documentation link for complete set of solutions and you don't have to use complex set analysis for this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-18475"&gt;Calculation of MTD, YTD, QTD, WTD in script level - The As-Of table concept - MTD, YTD, QTD, WTD calculation made easy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can find all the necessary calculations and just download the QVW file and see my solutions. I think it will fit all your requirements. If you face any problem please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sandip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 06:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365234#M618854</guid>
      <dc:creator>ananyaghosh</dc:creator>
      <dc:date>2017-05-18T06:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365235#M618855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just include '=' in vmin and vmax variable and You are done&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vMaxCompareDate: &lt;STRONG&gt;=&lt;/STRONG&gt;(AddYears(date(Max(SHIFT_DATE)),-1))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vMinCompareDate: &lt;STRONG&gt;=&lt;/STRONG&gt;(AddYears(date(Min(SHIFT_DATE)),-1))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 07:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365235#M618855</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2017-05-18T07:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Selection Compare Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365236#M618856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked perfect. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also my formula was off by a space between the = $&amp;nbsp; I needed to delete it.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum({&amp;lt;SHIFT_DATE = {'&amp;gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;= $&lt;/STRONG&gt;&lt;/SPAN&gt;(=vMinCompareDate)&amp;lt;=$(=vMaxCompareDate)'}&amp;gt;}Labor_Cost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;SHIFT_DATE = {'&amp;gt;=$(=vMinCompareDate)&amp;lt;=$(=vMaxCompareDate)'}&amp;gt;}Labor_Cost)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 17:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Selection-Compare-Previous-Year/m-p/1365236#M618856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-19T17:54:36Z</dc:date>
    </item>
  </channel>
</rss>

