<?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 Fiscal LYTD problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568460#M1098863</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;I can get the YTD for a fiscal year starting April, but not the LYTD. The YTD works successfully with this set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;fYear={$(vMaxYear)},Date=,fMonth=&amp;gt;} Revenue)&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Where vMaxYear=Max(FYear).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attempted the LYTD with vLastMaxYear=vMaxYear-1, and put this in the fYear= part of the above set analysis, but it showed me the entire last year's total. How can I modify this to get LYTD? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Apr 2014 16:38:21 GMT</pubDate>
    <dc:creator>sifatnabil</dc:creator>
    <dc:date>2014-04-12T16:38:21Z</dc:date>
    <item>
      <title>Fiscal LYTD problem</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568460#M1098863</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;I can get the YTD for a fiscal year starting April, but not the LYTD. The YTD works successfully with this set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;fYear={$(vMaxYear)},Date=,fMonth=&amp;gt;} Revenue)&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Where vMaxYear=Max(FYear).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attempted the LYTD with vLastMaxYear=vMaxYear-1, and put this in the fYear= part of the above set analysis, but it showed me the entire last year's total. How can I modify this to get LYTD? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 16:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568460#M1098863</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2014-04-12T16:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal LYTD problem</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568461#M1098864</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;Can you attach an example file if possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 19:48:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568461#M1098864</guid>
      <dc:creator />
      <dc:date>2014-04-12T19:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal LYTD problem</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568462#M1098865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 10pt;"&gt;please try:&lt;/P&gt;&lt;P style="font-size: 10pt;"&gt;&lt;/P&gt;&lt;P style="font-size: 10pt;"&gt;sum({&amp;lt;fYear={$(=&lt;SPAN style="font-size: 10pt;"&gt;Max(FYear)-1)&lt;/SPAN&gt;},Date=,fMonth=&amp;gt;} Revenue)&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2014 22:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568462#M1098865</guid>
      <dc:creator />
      <dc:date>2014-04-13T22:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal LYTD problem</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568463#M1098866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sifat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For LYTD, I don't think you should ignore the Date in your set analysis, otherwise, you'll get the last year's entire revenue. E.g. By specifying Date=, fMonth= , you're basically ignoring the Date and Month, which leaves you with just fYear = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vLastMaxYear&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what you can try:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Remove Date and fMonth from your set analysis. &lt;BR /&gt;&lt;EM&gt;NOTE: This method may not make sense if you're wanting to explicitly show the LYTD regardless of the Day or Month the user has selected. To get a true YTD, try the method below.&lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Ignore fMonth and fYear &lt;EM&gt;(and fDay too if you have it as a filter),&lt;/EM&gt; and construct a date range to select on the Date field. E.g. &amp;lt;fMonth=, fYear=, Date = {"&amp;gt;=1/04/2013&amp;lt;=14/04/2014"}.&lt;BR /&gt;&lt;BR /&gt;Of course you can store the Start and End date in a variable (for re-using), or construct the date on the fly:&lt;BR /&gt;a. &amp;lt; fMonth=, fYear=, Date = {"&amp;gt;= $(vLastYearStartDate) &amp;lt;= $(vCurrentDate)"} &amp;gt;&lt;BR /&gt;b. &amp;lt; fMonth=, fYear=, Date = {"&amp;gt;= $(=makedate(vLastMaxYear, month(today(2), day(today(2)))"&amp;nbsp; &amp;lt;= $(=max(Date)) &amp;gt;"&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully that'll give you some ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2014 23:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568463#M1098866</guid>
      <dc:creator>shawn-qv</dc:creator>
      <dc:date>2014-04-13T23:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal LYTD problem</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568464#M1098867</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;Thanks for your responses. I figured out the problem before these replies were made. It's essentially what &lt;A href="https://community.qlik.com/qlik-users/25014"&gt;Shawn-QV&lt;/A&gt; mentioned - my original set analysis was selecting the entire current year, and so attempting LYTD was selecting the entire last year too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fix is to set a current date (I've also set a current month), and do a "less than", which will sum the correct number of days for last year:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;fYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vLastMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DayNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;lt;=$(vCurrentDay)'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrentMonth)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(Revenue)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks for all your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 00:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-LYTD-problem/m-p/568464#M1098867</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2014-04-14T00:32:50Z</dc:date>
    </item>
  </channel>
</rss>

