<?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: Syntax for Set Analysis comparing Last Year to Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476453#M480842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to solve the problem though. I formated the variable to be in dateformat where I create the variable and it solved the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Nov 2013 12:52:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-04T12:52:31Z</dc:date>
    <item>
      <title>Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476450#M480839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to make a Set Analysis comparing sales for Last Year to Date. I have created a variable that show the date for last year. This variable is called vLYTD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variable is 2012-11-04 today when using the date() function otherwise 41217. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to make a set analysis for this variable but cant get the syntaxt to work. I think this has to do with the formating. At the moment I have written the line as following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(#vLastYear)},Datum={"&amp;lt;=$(#vLYTD)"}&amp;gt;}Budget), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where Datum should only make the summation for all records up to 2012-11-04. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help in solving this is appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476450#M480839</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476451#M480840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fredrik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;DateNum={"&amp;gt;=Num(YearStart(Today()))"} Budget)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your variable can be like this vLYTD= Num(YearStart(Today())) then you can use this variable in the set analysis i have shared &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476451#M480840</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476452#M480841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Maybe you need to match the date format of Datum: &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({$&amp;lt;Year={$(#vLastYear)},Datum={"&amp;lt;=date($(#vLYTD),'YYYY-MM-DD')"}&amp;gt;}Budget)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476452#M480841</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-11-04T12:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476453#M480842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to solve the problem though. I formated the variable to be in dateformat where I create the variable and it solved the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476453#M480842</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476454#M480843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I solved it though in the way below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vLYTD=Date(today()-365)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(#vLastYear)},Datum={'&amp;lt;=$(vLYTD)'}&amp;gt;}Budget)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before, I it was written, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vLYTD=Date(today())-365&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(#vLastYear)},Datum={'&amp;lt;=$(vLYTD)'}&amp;gt;}Budget)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476454#M480843</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476455#M480844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Subtracting 365 may trip you up with leap years. You can use the addyears function instead: vLYTD = date(addyears(today(),-1))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:59:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476455#M480844</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-11-04T12:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476456#M480845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fredrik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried using the Time Chart Wizard from the Tools menu ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a guide that helps you build a year on year comparison without the need of typing in any script. If needed, once you have completed the step you can go back to the object's properties and edit the expressions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 13:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476456#M480845</guid>
      <dc:creator />
      <dc:date>2013-11-04T13:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Set Analysis comparing Last Year to Date</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476457#M480846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works fine. I didnt know about that function and cant find it in the manual or help function. I know abou the leap year thing and was going to look into that and solve it when I got confirmation that the client wanted that comparison in their application. Now it is solved so that is very good. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 13:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-for-Set-Analysis-comparing-Last-Year-to-Date/m-p/476457#M480846</guid>
      <dc:creator />
      <dc:date>2013-11-04T13:49:21Z</dc:date>
    </item>
  </channel>
</rss>

