<?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: LYYTD Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451230#M804918</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whatever data you have in your data model when you use Max it gives data based on your data.&lt;/P&gt;&lt;P&gt;I suggest you have to use this in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible share some sample data to have a look.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For CCYTD:-&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;= {"&amp;gt;=$(=Date(AddYears(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;),-1),'MM/DD/YYYY')) &amp;lt;=$(=Date(YearStart(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;)),'MM/DD/YYYY'))"}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: inherit; font-style: inherit; font-weight: inherit; font-size: 10pt;"&gt;[Revenue]={'Actual'}&lt;/SPAN&gt;&amp;gt;}&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;[Income]&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For LYYTD:-&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;= {"&amp;gt;=$(=Date(AddYears(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;),-2),'MM/DD/YYYY')) &amp;lt;=$(=Date(AddYears(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;),-1),'MM/DD/YYYY'))"}&amp;gt;}&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;[Income]&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Oct 2017 13:21:27 GMT</pubDate>
    <dc:creator>its_anandrjs</dc:creator>
    <dc:date>2017-10-28T13:21:27Z</dc:date>
    <item>
      <title>LYYTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451229#M804916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one please help me on this.&lt;/P&gt;&lt;P&gt;I am trying to calculate CYYTD and LYYTD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;For CYYTD:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For the Year 2017 I have the data from 1/jan/2017 to 10/sep/2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the below logic &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Date]= {"&amp;gt;=$(=Date(YearStart(max([&lt;SPAN style="font-size: 13.3333px;"&gt;Date&lt;/SPAN&gt;])),'MM/DD/YYYY')) &lt;/P&gt;&lt;P&gt;&amp;lt;=$(=Date(AddYears(max([&lt;SPAN style="font-size: 13.3333px;"&gt;Date&lt;/SPAN&gt;])),'MM/DD/YYYY'))"},&lt;SPAN style="font-size: 10pt;"&gt;[Revenue]={'Actual'}&amp;gt;}[Income])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Its working fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;For LYYTD:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;For the Year 2016 I have the data from 1/March/2016 to 31/Dec/2016.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Out of this I need to show the LYYTD upto 10/sep/2017 i.e., from &lt;SPAN style="font-size: 13.3333px;"&gt;1/March/2016 to &lt;SPAN style="font-size: 13.3333px;"&gt;10/sep/2017.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Means on the Current YTD what ever the maximum month data I have,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;for LYYTD also&amp;nbsp; i need to calculate the data up to that Month only.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;Please help me to calulate this LYYTD Expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451229#M804916</guid>
      <dc:creator>bhavvibudagam</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: LYYTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451230#M804918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whatever data you have in your data model when you use Max it gives data based on your data.&lt;/P&gt;&lt;P&gt;I suggest you have to use this in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible share some sample data to have a look.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For CCYTD:-&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;= {"&amp;gt;=$(=Date(AddYears(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;),-1),'MM/DD/YYYY')) &amp;lt;=$(=Date(YearStart(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;)),'MM/DD/YYYY'))"}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: inherit; font-style: inherit; font-weight: inherit; font-size: 10pt;"&gt;[Revenue]={'Actual'}&lt;/SPAN&gt;&amp;gt;}&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;[Income]&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For LYYTD:-&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;= {"&amp;gt;=$(=Date(AddYears(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;),-2),'MM/DD/YYYY')) &amp;lt;=$(=Date(AddYears(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date]&lt;/SPAN&gt;),-1),'MM/DD/YYYY'))"}&amp;gt;}&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;[Income]&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 13:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451230#M804918</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-28T13:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: LYYTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451231#M804919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have tried above expressions. But those are not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Could you please find the attached application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expected output for CYYTD - 1/1/2016 to 10/10/2016 is 17,429 Its getting correctly.&lt;/P&gt;&lt;P&gt;The expected output for LYYTD - 1/1/2015 to 10/10/2015 is 16372 but its showing zero when I select 2016 other wise showing correct.&lt;/P&gt;&lt;P&gt;When I select 2015 the 2014 is the LYTYD right again its showing 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is other months data also under 2015 but need to calculate the data upto the CYYTD months data only i.e, upto october.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 14:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451231#M804919</guid>
      <dc:creator>bhavvibudagam</dc:creator>
      <dc:date>2017-10-28T14:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: LYYTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451232#M804920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide sample in Qlikview file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 14:40:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451232#M804920</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-28T14:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: LYYTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451233#M804921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anand,&lt;/P&gt;&lt;P&gt;Please find the attached app in Qlikview.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 14:46:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451233#M804921</guid>
      <dc:creator>bhavvibudagam</dc:creator>
      <dc:date>2017-10-28T14:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: LYYTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451234#M804922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In LYTD By pass the Year field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='LYTYD:' &amp;amp;''&amp;amp; Count({&amp;lt;DATE= {"&amp;gt;=$(=Date(YearStart(max(DATE),-1),'MM/DD/YYYY')) &amp;lt;=$(=Date(AddYears(max(DATE),-1),'MM/DD/YYYY'))"},&lt;STRONG&gt;Year=&lt;/STRONG&gt;&amp;gt;}distinct LWMAINID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the attached also&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 15:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LYYTD-Calculation/m-p/1451234#M804922</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-28T15:14:44Z</dc:date>
    </item>
  </channel>
</rss>

