<?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: Expression for calculating YTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943509#M325171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; Now it only brings data from year start of selected date to that date.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Uhm... as I understand it YTD stands for Year To Date, i.e. the period from the start of the year of the selected date upto the selected date. Can you explain what you think YTD should mean?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Oct 2015 07:18:38 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-10-10T07:18:38Z</dc:date>
    <item>
      <title>Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943503#M325165</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;I have a calendar date data and want to calculate YTD over it. I am having highest date in it as '01-Aug-2015' so, I am considering that as my current date. I had used following expression for calculating the YTD:&lt;/P&gt;&lt;P&gt;'=sum({1 &amp;lt;CalendarDate= {"&amp;gt;= YearStart(GetFieldSelections(CalendarDate)) &amp;lt;= $(=max(CalendarDate))"}&amp;gt;} sale)'&lt;/P&gt;&lt;P&gt;and if I passed a date as '01-Jun-2013', it brought me data for sale from '01-Apr-2012' i.e. the first date in my data to '01-Jun-2013' which, it should actually bring from '01-Jun-2013' to '01-Aug-2015' (highest date in my data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I reversed the operators between dates in the above expression such as:&lt;/P&gt;&lt;P&gt;=sum({1 &amp;lt;CalendarDate= {"&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;=&lt;/SPAN&gt; YearStart(GetFieldSelections(CalendarDate)) &lt;SPAN style="color: #ff0000;"&gt;&amp;gt;=&lt;/SPAN&gt; $(=max(CalendarDate))"}&amp;gt;} BSLAMC)&lt;/P&gt;&lt;P&gt;This gave me the data from '01-Jun-2013' to '01-Aug-2015' and I want it from '01-Jan-2013' to '01-Aug-2015'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't&amp;nbsp; understand where I am going wrong.&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Madhura&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 08:09:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943503#M325165</guid>
      <dc:creator />
      <dc:date>2015-10-09T08:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943504#M325166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=sum({1 &amp;lt;CalendarDate= {"&amp;gt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(=YearStart(max(CalendarDate)))&lt;/SPAN&gt;&amp;lt;=$(=max(CalendarDate))"}&amp;gt;} sale)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 14:37:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943504#M325166</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-09T14:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943505#M325167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year=, Quarter=, Month=, Week=, Date={‘&amp;gt;=$(=YearStart(&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;max(CalendarDate)))&amp;lt;=$(=&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;max(CalendarDate)&lt;/SPAN&gt;)’}&amp;gt;} Sales )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;This sample code was based on this post:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-wiki-small" data-containerid="2049" data-containertype="14" data-objectid="9162" data-objecttype="102" href="https://community.qlik.com/docs/DOC-9162"&gt;https://community.qlik.com/docs/DOC-9162&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a good weekend &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 14:44:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943505#M325167</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2015-10-09T14:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943506#M325168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for replicating my answer... incorrectly. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice weekend &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 14:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943506#M325168</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-09T14:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943507#M325169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying. Badly needed help in this one. I tried with your expression but, unfortunately no luck.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; Now it only brings data from year start of selected date to that date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't really find any reason for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 06:26:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943507#M325169</guid>
      <dc:creator />
      <dc:date>2015-10-10T06:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943508#M325170</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;Try this expression to get data from &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; '01-Jan-2013' to '01-Aug-2015'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({1 &amp;lt;CalendarDate= {"&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(=YearStart(max(CalendarDate), -2))&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;lt;=$(=max(CalendarDate))"}&amp;gt;} sale)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 07:17:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943508#M325170</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-10-10T07:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943509#M325171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; Now it only brings data from year start of selected date to that date.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Uhm... as I understand it YTD stands for Year To Date, i.e. the period from the start of the year of the selected date upto the selected date. Can you explain what you think YTD should mean?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 07:18:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943509#M325171</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-10T07:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943510#M325172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried it. Sorry but, no luck. Brings data from first date in the table to the selected date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 07:26:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943510#M325172</guid>
      <dc:creator />
      <dc:date>2015-10-10T07:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943511#M325173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it means the data from the selected date's year(from beginning of year) to the latest/ current date in the table.&lt;/P&gt;&lt;P&gt;Am I wrong??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 07:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943511#M325173</guid>
      <dc:creator />
      <dc:date>2015-10-10T07:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943512#M325174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, because the latest date in the table can be in another year then the year of the selected date. Everything after the start of the year of the select date is not YTD. But try this expression: sum({1 &amp;lt;CalendarDate= {"&amp;gt;=$(=YearStart(max(CalendarDate)))"}&amp;gt;} sale)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 07:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943512#M325174</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-10T07:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943513#M325175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I so much interpreted it wrongly. Thanks for clearing things!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; And am so sorry about causing so much confusion. Also, the previous expression works in that case whereas, this one gives data onwards the selected date. Both usable according to requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 07:43:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943513#M325175</guid>
      <dc:creator />
      <dc:date>2015-10-10T07:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for calculating YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943514#M325176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({1 &amp;lt;CalendarDate= {"&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;lt;=$(=max(CalendarDate))"}&amp;gt;} sale)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 08:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-calculating-YTD/m-p/943514#M325176</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-10-10T08:32:27Z</dc:date>
    </item>
  </channel>
</rss>

