<?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: How do you refer to a year in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576114#M598624</link>
    <description>Hi, can you try with?:&lt;BR /&gt;Pick(match(ValueList('2017','2018','2019'), '2017','2018','2019')&lt;BR /&gt;,sum({&amp;lt;DATE={"$(=YearEnd(addmonths(max(DATE),-24)))"} &amp;gt;}AMOUNT)&lt;BR /&gt;,sum({&amp;lt;DATE={"$(=YearEnd(addmonths(max(DATE),-12)))"} &amp;gt;}AMOUNT)&lt;BR /&gt;,sum({&amp;lt;DATE={"$(=date(max(DATE)))"} &amp;gt;}AMOUNT)&lt;BR /&gt;)</description>
    <pubDate>Thu, 02 May 2019 19:48:14 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2019-05-02T19:48:14Z</dc:date>
    <item>
      <title>How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576027#M598620</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 years of monthly data (31 January 2017 until 31 March 2019) and I would like to get the end of year amounts for the past three years.&lt;/P&gt;&lt;P&gt;1 Column for each year, so&lt;/P&gt;&lt;P&gt;2017 would be 31 December 2017&lt;/P&gt;&lt;P&gt;2018 would be 31 December 2018&lt;/P&gt;&lt;P&gt;2019 would be 31 March 2019&lt;/P&gt;&lt;P&gt;I have written the expression as such:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="1"&gt;if&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;ValueList&lt;/FONT&gt;&lt;FONT size="1"&gt;('2017','2018','2019') = '2017',&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({1 &amp;lt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Date&lt;/FONT&gt;&lt;FONT size="1"&gt;={&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"=$(=YearEnd(addmonths(max(Date),-24)))"&lt;/FONT&gt;&lt;FONT size="1"&gt;} &amp;gt;}&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;BAL&lt;/FONT&gt;&lt;FONT size="1"&gt;),&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;if&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;ValueList&lt;/FONT&gt;&lt;FONT size="1"&gt;('2017','2018','2019') = '2018',&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({1 &amp;lt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Date&lt;/FONT&gt;&lt;FONT size="1"&gt;={&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"=$(=YearEnd(addmonths(max(Date),-12)))"&lt;/FONT&gt;&lt;FONT size="1"&gt;} &amp;gt;}&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;BAL&lt;/FONT&gt;&lt;FONT size="1"&gt;),&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;if&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;ValueList&lt;/FONT&gt;&lt;FONT size="1"&gt;('2017','2018','2019') = '2019',&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({1 &amp;lt;&lt;FONT color="#800000" size="1"&gt;Date&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;={&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"=$(=max(Date))"&lt;/FONT&gt;&lt;FONT size="1"&gt;} &amp;gt;}&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;BAL&lt;/FONT&gt;&lt;FONT size="1"&gt;)))) &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;the dimension is just the Valuelist.&amp;nbsp; I need to make sure that the Data selections won't effect the output.&amp;nbsp; So it will always look at the latest data and go 2 years back, 1 year back and the current period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is very much appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576027#M598620</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2024-11-16T03:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576029#M598621</link>
      <description>I see you have {1 in your set analysis. that should work for ignoring all filters.&lt;BR /&gt;if you want to be specific, Add something like below into your set analysis&lt;BR /&gt;Year=,Month= etc. (substitute appropriate filter names)&lt;BR /&gt;</description>
      <pubDate>Thu, 02 May 2019 15:47:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576029#M598621</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-05-02T15:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576034#M598622</link>
      <description>&lt;P&gt;Thank you for coming back to me.&amp;nbsp; I have attached an example to show what I am talking about.&amp;nbsp; It seems like I am getting the same amount for each year.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 16:05:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576034#M598622</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2019-05-02T16:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576038#M598623</link>
      <description>&lt;P&gt;Issue is primarily = after the "&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({1 &amp;lt;&lt;FONT size="1" color="#800000"&gt;Date&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;={&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;"$(=max(Date))"&lt;/FONT&gt;&lt;FONT size="1"&gt;} &amp;gt;}&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;BAL&lt;/FONT&gt;&lt;FONT size="1"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;also i would create a year, month columns (ideally a master calendar).&lt;/P&gt;&lt;P&gt;See attached&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 16:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576038#M598623</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-05-02T16:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576114#M598624</link>
      <description>Hi, can you try with?:&lt;BR /&gt;Pick(match(ValueList('2017','2018','2019'), '2017','2018','2019')&lt;BR /&gt;,sum({&amp;lt;DATE={"$(=YearEnd(addmonths(max(DATE),-24)))"} &amp;gt;}AMOUNT)&lt;BR /&gt;,sum({&amp;lt;DATE={"$(=YearEnd(addmonths(max(DATE),-12)))"} &amp;gt;}AMOUNT)&lt;BR /&gt;,sum({&amp;lt;DATE={"$(=date(max(DATE)))"} &amp;gt;}AMOUNT)&lt;BR /&gt;)</description>
      <pubDate>Thu, 02 May 2019 19:48:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576114#M598624</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2019-05-02T19:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576122#M598625</link>
      <description>As a quick follow up. I want to make sure that a date selection in a list doesn't effect the calculations. &amp;nbsp;I tried putting 1 after sum({1&amp;lt;.... but a selection of the date is changing my table using your expression with pick.&lt;BR /&gt;Thanks,</description>
      <pubDate>Thu, 02 May 2019 20:13:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576122#M598625</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2019-05-02T20:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576245#M598626</link>
      <description>&lt;P&gt;The {1} should be for the DATE used to create the filters:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Pick(match(ValueList('2017','2018','2019'), '2017','2018','2019')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,sum({&amp;lt;DATE={"$(=YearEnd(addmonths(max(&lt;STRONG&gt;{1}&lt;/STRONG&gt; DATE),-24)))"} &amp;gt;}AMOUNT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,sum({&amp;lt;DATE={"$(=YearEnd(addmonths(max(&lt;STRONG&gt;{1}&lt;/STRONG&gt; DATE),-12)))"} &amp;gt;}AMOUNT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,sum({&amp;lt;DATE={"$(=date(max(&lt;STRONG&gt;{1}&lt;/STRONG&gt; DATE)))"} &amp;gt;}AMOUNT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 06:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576245#M598626</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2019-05-03T06:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you refer to a year in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576251#M598627</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 06:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-refer-to-a-year-in-set-analysis/m-p/1576251#M598627</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2019-05-03T06:56:34Z</dc:date>
    </item>
  </channel>
</rss>

