<?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 Set Analysis Problem (Year / Year-1) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228834#M80833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think that you have to use variables, I use the following where Cal-Year is a field in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cal_Year={$(=Only(Cal_Year)-1)}&amp;gt;} [Cost Value]) - sum({&amp;lt;Cal_Year={$(=Only(Cal_Year)-1)}&amp;gt;} [Platinum Bonus])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jul 2010 12:37:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-21T12:37:16Z</dc:date>
    <item>
      <title>Set Analysis Problem (Year / Year-1)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228829#M80828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need some help with Set Analysis.&lt;/P&gt;&lt;P&gt;Here is the context :&lt;/P&gt;&lt;P&gt;I have a table with these expressions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt; Quantity for the selected month --&amp;gt; No problem&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt; Quantity for the current fiscal year till the selected month --&amp;gt; No Problem&lt;/P&gt;&lt;P style="PADDING-LEFT: 30px"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;({&amp;lt;&lt;B&gt;Fiscal_Year&lt;/B&gt;= {&lt;B&gt;&lt;I&gt;$(=Max(Fiscal_Year))&lt;/I&gt;&lt;/B&gt;}, &lt;B&gt;Mois_Exercice&lt;/B&gt; = {&lt;B&gt;"&amp;lt;=$(=Max(Fiscal_Month))"&lt;/B&gt;} &amp;gt;}&lt;B&gt;Quantity&lt;/B&gt;)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt; Quantity for the previous fiscal year till the selected month. --&amp;gt; Problem&lt;/P&gt;&lt;P style="PADDING-LEFT: 30px"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;({&amp;lt;&lt;STRONG&gt;Fiscal_Year&lt;/STRONG&gt;= {&lt;I&gt;&lt;STRONG&gt;$(=(Max(Fiscal_Year) -1))&lt;/STRONG&gt;&lt;/I&gt;}, &lt;STRONG&gt;Mois_Exercice&lt;/STRONG&gt; = {&lt;STRONG&gt;"&amp;lt;=$(=Max(Fiscal_Month))"&lt;/STRONG&gt;} &amp;gt;}&lt;STRONG&gt;Quantity&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example :&lt;/P&gt;&lt;P&gt;(What I want)&lt;/P&gt;&lt;P&gt;Civil Month selected : August (correspond to Fiscal Month 10) Fiscal Year selected : 2009-2010&lt;/P&gt;&lt;P&gt;Quantity( Fiscal Year = 2009-2010 Fiscal Month : 1 to 10 ) 50&lt;/P&gt;&lt;P&gt;QuantityPrevious Fiscal Year = 2008-2009 Fiscal Month : 1 to 10 ) 60&lt;/P&gt;&lt;P&gt;--------------------------------&lt;/P&gt;&lt;P&gt;(What I have)&lt;/P&gt;&lt;P&gt;Civil Month selected : August (correspond to Fiscal Month 10) Fiscal Year selected : 2009-2010&lt;/P&gt;&lt;P&gt;Quantity( Fiscal Year = 2009-2010 Fiscal Month : 1 to 10 ) 50&lt;/P&gt;&lt;P&gt;QuantityPrevious Fiscal Year = 2008-2009 Fiscal Month : 1 to 10 ) 0&lt;/P&gt;&lt;P&gt;--------------------------------&lt;/P&gt;&lt;P&gt;(What I have bis)&lt;/P&gt;&lt;P&gt;Civil Month selected : August (correspond to Fiscal Month 10) Fiscal Year selected : 2009-2010 and 2008-2009&lt;/P&gt;&lt;P&gt;Quantity( Fiscal Year = 2009-2010 Fiscal Month : 1 to 10 ) 50&lt;/P&gt;&lt;P&gt;QuantityPrevious Fiscal Year = 2008-2009 Fiscal Month : 1 to 10 ) 60&lt;/P&gt;&lt;P&gt;--------------------------------&lt;/P&gt;&lt;P&gt;My problem is that the quantity displayed for the previous fiscal year equals 0 when I select one fiscal year.&lt;/P&gt;&lt;P&gt;If I select a fiscal year and the previous fiscal year, the data are available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to quantities for both fiscal years when I select just one fiscal year but I don't know what's wrong with my expressions .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me it's very important ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 09:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228829#M80828</guid>
      <dc:creator />
      <dc:date>2010-07-21T09:13:22Z</dc:date>
    </item>
    <item>
      <title>AW:Set Analysis Problem (Year / Year-1)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228830#M80829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;for Set analysis you have to enter your expression in a varable:&lt;/P&gt;&lt;P&gt;varMaxFiscalYear =Max(Fiscal_Year)&lt;BR /&gt;varMaxFiscalMonth =Max(Fiscal_Month)&lt;/P&gt;&lt;P&gt;dito for Year-1 or Year+1, then enter&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;({&amp;lt;&lt;B&gt;Fiscal_Year&lt;/B&gt;= {"=&lt;B&gt;&lt;I&gt;$(varMaxFiscalYear)"&lt;/I&gt;&lt;/B&gt;}, &lt;B&gt;Mois_Exercice&lt;/B&gt; = {&lt;B&gt;"&amp;lt;=$(varMaxFiscalMonth)"&lt;/B&gt;} &amp;gt;}&lt;B&gt;Quantity&lt;/B&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 09:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228830#M80829</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2010-07-21T09:33:12Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Problem (Year / Year-1)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228831#M80830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hI,&lt;/P&gt;&lt;P&gt;First declare a variable to calculate prior year as below&lt;BR /&gt;PriorYear = Max(Fiscal_Year)-1&lt;/P&gt;&lt;P&gt;Now use the variable in your expression as given below&lt;BR /&gt;Sum({&amp;lt;Fiscal_Year= {'$(=PriorYear)'}, Mois_Exercice = {"&amp;lt;=$(=Max(Fiscal_Month))"} &amp;gt;}Quantity)&lt;/P&gt;&lt;P&gt;Hope this helps u.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 09:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228831#M80830</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2010-07-21T09:36:24Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Problem (Year / Year-1)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228832#M80831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;Unfortunately, it doesn't work !&lt;/P&gt;&lt;P&gt;Now I have data displayed but it's not the good ones. For the prior year, I have data of the year selected (prioryear +1). I don't understand why .&lt;/P&gt;&lt;P&gt;I've put all the expressions MAX(..) on variables like you suggested.&lt;/P&gt;&lt;P&gt;Here is a screenshot of the application.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/1258.SetAnalysis.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/1258.SetAnalysis.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the record :&lt;/P&gt;&lt;P&gt;When Annee_Exercice= 2008 --&amp;gt; Fiscal Year = 2007-2008&lt;/P&gt;&lt;P&gt;When Annee_Exercice = 2009 --&amp;gt; Fiscal Year = 2008-2009&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 10:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228832#M80831</guid>
      <dc:creator />
      <dc:date>2010-07-21T10:02:08Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Problem (Year / Year-1)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228833#M80832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact I have forgot a variable in my expressions. It works now !&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 10:46:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228833#M80832</guid>
      <dc:creator />
      <dc:date>2010-07-21T10:46:34Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Problem (Year / Year-1)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228834#M80833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think that you have to use variables, I use the following where Cal-Year is a field in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cal_Year={$(=Only(Cal_Year)-1)}&amp;gt;} [Cost Value]) - sum({&amp;lt;Cal_Year={$(=Only(Cal_Year)-1)}&amp;gt;} [Platinum Bonus])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 12:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228834#M80833</guid>
      <dc:creator />
      <dc:date>2010-07-21T12:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Problem (Year / Year-1)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228835#M80834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I also have the same problem.&lt;/P&gt;&lt;P&gt;If I select single FY say, 2015-2016, I get hyphen, whereas if I select 2 financial years together like 2014-2015 &amp;amp; 2015-2016, I get correct numbers.&lt;/P&gt;&lt;P&gt;I have one more concern. In my expression, I also need to add a date filter.&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date={"&amp;gt;=$(vLYMinDate)&amp;lt;=$(vLYMaxDate)"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;Could anyone please suggest a solution for this problem?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vidhya&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 08:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem-Year-Year-1/m-p/228835#M80834</guid>
      <dc:creator />
      <dc:date>2016-01-18T08:43:41Z</dc:date>
    </item>
  </channel>
</rss>

