<?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: Adjust Expression to Calculate Prior Year Values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370959#M492604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;=Sum({&amp;lt;date_activity = {"=AddMonths(Date,-12)"}&amp;gt;}leads_created)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Date could be any date or Today() if you want. You make sure about the format of date, you could use Date(Date,'DD/MM/YYYY') or Date(Today(),'DD/MM/YYYY') instead only Date inside the function AddMonths.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Hope this helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jun 2012 19:41:10 GMT</pubDate>
    <dc:creator>chematos</dc:creator>
    <dc:date>2012-06-27T19:41:10Z</dc:date>
    <item>
      <title>Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370955#M492600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi there,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm trying to write an expression that will return the number of sales leads created from the same day last year (day-of-week adjusted). This is what I have so far:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sum ({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;date_activity&lt;/SPAN&gt;={'=$(=Date(Today(date_activity)-364))'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;leads_created&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;To be honest, I'm so new to QlikView that I don't really know what this formula even says...I just copied it from another thread and added the '-364' to try to adjust the Activity Date ('date_activity').&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If today's date in my DB is 6-26-12, and I want leads created from 6-30-11 (364 days ago), how would I write the expression? I want this to be a rolling calculation, so hard-coding a date won't work...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Stephen&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 16:59:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370955#M492600</guid>
      <dc:creator />
      <dc:date>2012-06-27T16:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370956#M492601</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({&amp;lt;date_activity = {"=Date(Max(date_activity)-364)"}&amp;gt;}leads_created)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 17:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370956#M492601</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-06-27T17:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370957#M492602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for trying to help; unfortunately that formula returns the current sum of leads created, not the same-day last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 17:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370957#M492602</guid>
      <dc:creator />
      <dc:date>2012-06-27T17:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370958#M492603</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({$&amp;lt;date_activity={'$(=Date(Max(date_activity)-364))'}&amp;gt;}leads_created)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; See the below link, it helps for set analysis problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=_CNGH"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=_CNGH&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope it helps you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 18:59:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370958#M492603</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-06-27T18:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370959#M492604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;=Sum({&amp;lt;date_activity = {"=AddMonths(Date,-12)"}&amp;gt;}leads_created)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Date could be any date or Today() if you want. You make sure about the format of date, you could use Date(Date,'DD/MM/YYYY') or Date(Today(),'DD/MM/YYYY') instead only Date inside the function AddMonths.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Hope this helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 19:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370959#M492604</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2012-06-27T19:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370960#M492605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I found this tool a little while ago but then it 'moved'...glad to have it again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 19:47:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370960#M492605</guid>
      <dc:creator />
      <dc:date>2012-06-27T19:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370961#M492606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;=Sum({$&amp;lt;date_activity={'$(=AddYears(Max(date_activity)&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;,-1&lt;/SPAN&gt;))'}&amp;gt;} leads_created)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #ffffff; font-family: Arial;"&gt;Hope this helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #ffffff; font-family: Arial;"&gt;Best Regards.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #ffffff; font-family: Arial;"&gt;Tonial&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 02:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370961#M492606</guid>
      <dc:creator>fernando_tonial</dc:creator>
      <dc:date>2012-06-28T02:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust Expression to Calculate Prior Year Values</title>
      <link>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370962#M492607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, unfortunately that returns ‘0’…thanks for trying to help, I appreciate it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen Williams&lt;/P&gt;&lt;P&gt;Financial Analyst&lt;/P&gt;&lt;P&gt;A Place For Mom, Inc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1300 Dexter Ave N&lt;/P&gt;&lt;P&gt;Seattle, WA 98109&lt;/P&gt;&lt;P&gt;Phone:  206-802-1612&lt;/P&gt;&lt;P&gt;E-Mail: stephenw@aplaceformom.com&amp;lt;mailto:stephenw@aplaceformom.com&amp;gt;&lt;/P&gt;&lt;P&gt;Website:  www.aplaceformom.com&amp;lt;http://www.aplaceformom.com/&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 22:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adjust-Expression-to-Calculate-Prior-Year-Values/m-p/370962#M492607</guid>
      <dc:creator />
      <dc:date>2012-06-28T22:06:10Z</dc:date>
    </item>
  </channel>
</rss>

