<?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: Set analysis and start month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992715#M644492</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Betty,&lt;/P&gt;&lt;P&gt;You could try using variables to define current and previous year:&lt;/P&gt;&lt;P&gt;- vCurrentYear = Year &lt;/P&gt;&lt;P&gt;- vPreviousYear = Year -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add the variables to your set analysis: &lt;/P&gt;&lt;P&gt;- CY Sales = sum({&amp;lt;year = {$(vCurrentYear)}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;- PY Sales = sum({&amp;lt;year = {$vPreviousYear}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you select 2015 second column will update to 2014. If you want to work with real dates, you can use Now() and Year() functions as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Nov 2015 16:05:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-11-26T16:05:57Z</dc:date>
    <item>
      <title>Set analysis and start month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992713#M644490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my name is Betty and I'm new at this. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I want to make a set analysis where I compare this years sale to last years sale and I want to start from January. I've actually made one, but can't seem to figure out how to make it start from january. Can you please help me out a little? &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the expression I've written &lt;SPAN style="text-decoration: underline;"&gt;(know that I don't use dollar signs since I' m a swede)&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;year={2014}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;sum({&amp;lt;year={2015}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this store opened 2014 and so I only have sales information from 2014-2015, but let's say that 2016 comes. I don't want to have to write another expression only for that year. I&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;s there also a better way to make an expression that will apply to all years?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely, &lt;/P&gt;&lt;P&gt;Betty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 15:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992713#M644490</guid>
      <dc:creator />
      <dc:date>2015-11-26T15:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and start month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992714#M644491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi try like this to get current , and previous&amp;nbsp; n years : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;current year : &lt;/P&gt;&lt;P&gt;sum({&amp;lt;year={$(=year(Today()))}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;last year :&lt;/P&gt;&lt;P&gt;sum({&amp;lt;year={$(=year(Today())-1)&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;past last year :&lt;/P&gt;&lt;P&gt;sum({&amp;lt;year={$(=year(Today())-2)&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 16:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992714#M644491</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2015-11-26T16:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and start month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992715#M644492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Betty,&lt;/P&gt;&lt;P&gt;You could try using variables to define current and previous year:&lt;/P&gt;&lt;P&gt;- vCurrentYear = Year &lt;/P&gt;&lt;P&gt;- vPreviousYear = Year -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add the variables to your set analysis: &lt;/P&gt;&lt;P&gt;- CY Sales = sum({&amp;lt;year = {$(vCurrentYear)}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;- PY Sales = sum({&amp;lt;year = {$vPreviousYear}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you select 2015 second column will update to 2014. If you want to work with real dates, you can use Now() and Year() functions as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 16:05:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992715#M644492</guid>
      <dc:creator />
      <dc:date>2015-11-26T16:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and start month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992716#M644493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also read through these series of blog posts:&lt;/P&gt;&lt;P&gt;&lt;A href="http://aftersync.com/blog/category/the-magic-of-set-analysis" title="http://aftersync.com/blog/category/the-magic-of-set-analysis"&gt;The Magic Of Set Analysis Archives • AfterSync - QlikView Consulting&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://aftersync.com/blog/the-magic-of-set-analysis-point-in-time-reporting" title="http://aftersync.com/blog/the-magic-of-set-analysis-point-in-time-reporting"&gt;The Magic of Set Analysis - Point In Time Reporting • Blog • AfterSync&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://aftersync.com/blog/point-in-time-reporting-out-of-the-box" title="http://aftersync.com/blog/point-in-time-reporting-out-of-the-box"&gt;Easy Point in Time Reporting in QlikView • Blog • AfterSync&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 16:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992716#M644493</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-26T16:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and start month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992717#M644494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you guys for answering so quickly! I managed to fix it yesterday =D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 09:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-start-month/m-p/992717#M644494</guid>
      <dc:creator />
      <dc:date>2015-11-27T09:51:31Z</dc:date>
    </item>
  </channel>
</rss>

