<?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: YTD in Cyclic Group! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321125#M1191986</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishnamorthy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please provide some code? It will be helpful for me. Still I couldn't complete YTD Task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jun 2011 07:37:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-27T07:37:11Z</dc:date>
    <item>
      <title>YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321119#M1191978</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 have created a cyclic group called "Date" which contains fields such as Year, Month and Week. Along with these fields I want to create one more field which calculates "YTD". So that user can select YTD from the cyclic group like the way they select Year, Month and Week. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how to do that? Sample application will do good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 13:55:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321119#M1191978</guid>
      <dc:creator />
      <dc:date>2011-06-25T13:55:30Z</dc:date>
    </item>
    <item>
      <title>YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321120#M1191979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If YTD is a field in any of your logical files loaded in the script, you can add this to the cyclic group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If YTD is a field calculated by a chart expression, you cannot add&amp;nbsp; the calculated field to the group&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 14:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321120#M1191979</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-06-25T14:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321121#M1191980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishnamoorthy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Makes sense but may I know how it can be calculated in the script so that I can use it in the cyclic group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Temp_date:&lt;BR /&gt;Load Max(Floor(Year)) AS YTD resident Calendar;&lt;BR /&gt;Drop table Temp_date; //no longer needed &lt;/P&gt;&lt;P&gt;LET vCurrentYear = Peek('YTD', 0, 'Temp_date');&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;After that can I add YTD in cyclic group as it is YTD is more less equal to start of the year to to till date and I guess Max(Floor(Year)) gives the same YTD. i,e Starting of the year to till date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain your view!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 14:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321121#M1191980</guid>
      <dc:creator />
      <dc:date>2011-06-25T14:52:12Z</dc:date>
    </item>
    <item>
      <title>YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321122#M1191981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Attitude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in addition to what &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/krishnamoorthy" id="jive-382704378125245318600"&gt;krishnamoorthy&lt;/A&gt; said above: try this in your script (where you created Year, Month and Week):&lt;/P&gt;&lt;P&gt;LOAD ... . . &lt;/P&gt;&lt;P&gt;YearToDate( SourceDate)&amp;nbsp;&amp;nbsp;&amp;nbsp; AS YTD,&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 15:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321122#M1191981</guid>
      <dc:creator />
      <dc:date>2011-06-25T15:07:22Z</dc:date>
    </item>
    <item>
      <title>YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321123#M1191982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the YTD value has to be calculated in the script, The 'To-Date' in YTD has to be defined prior to script execution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way is to default it to today's date. In this case, the reload schedule of the document has to be at least daily or as frequent as the data reload, if the relead schedule is more frequent than once per day. The YTD value calculated this way will be for the total set {1} as the user selection takes place after the script execution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(One may try to use the variables in the script which can be set in the command-line of releoad. In this case, the policy for using a To-date in all YTD has to be acceptable to users.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all such techniques, we give up the user-interaction effects. I am not sure if adding YTD in a cyclic group will justify the effort of implementation or the functionality we forgo, especially when YTD/QTD/MTD analyses in comparison with previous YTD/QTD/MTD values can be done very elegantly using set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However everything depends on what the user wants, though a QlikView consultant can influence/manage user expectations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just my 2 cents.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 19:23:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321123#M1191982</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-06-25T19:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321124#M1191984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I see example in the help I think it just returns true are false. Are you sure that it is going to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;H2&gt;Examples:&lt;/H2&gt;&lt;P&gt;Assume last reload time = 1999-11-18&lt;/P&gt;&lt;TABLE cellspacing="0" style="margin-top: 14pt; margin-left: 40px; width: 450px;" width="450"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1998-11-18' )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns false&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1999-02-01' )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns true&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1999-11-18' )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns true&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1999-11-19' )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns false&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1998-11-18', -1 )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns true&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1999-11-18', -1 )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns false&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1999-04-30', 0, 5 )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns false&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P style="font-weight: bold;"&gt;yeartodate( '1999-05-01', 0, 5 )&lt;/P&gt;&lt;/TD&gt;&lt;TD style="width: 50%; x-cell-content-align: TOP; padding: 7px;" valign="top" width="50%"&gt;&lt;P&gt;returns true&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 07:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321124#M1191984</guid>
      <dc:creator />
      <dc:date>2011-06-27T07:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321125#M1191986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishnamorthy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please provide some code? It will be helpful for me. Still I couldn't complete YTD Task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 07:37:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321125#M1191986</guid>
      <dc:creator />
      <dc:date>2011-06-27T07:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321126#M1191987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Attitude,&lt;/P&gt;&lt;P&gt;yes of course. Take a look at my little example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 07:50:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321126#M1191987</guid>
      <dc:creator />
      <dc:date>2011-06-27T07:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321127#M1191988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Roland&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. If I want the year to start from 27/12/YYYY instead of 01/01/YYYY. What changes will be required in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet to implement your code in my application. Will try and let you know on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:14:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321127#M1191988</guid>
      <dc:creator />
      <dc:date>2011-06-27T11:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321128#M1191989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What code I need to add in the below code to select the 4 days back from the current YTD. i,e MyDate should display date from 27/12/2010 to till date.Also let me know whether I am going in the right way. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=if(Year2date(MyDate)=-1 OR &lt;STRONG&gt;????&lt;/STRONG&gt;,MyDate) &lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:50:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321128#M1191989</guid>
      <dc:creator />
      <dc:date>2011-06-27T11:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: YTD in Cyclic Group!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321129#M1191990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;this should work:&lt;/P&gt;&lt;P&gt;sum(if(YTD= -1 OR MyDate &amp;gt;= '27.12.2010' and MyDate &amp;lt; '01.01.2011',MyVal)) // -1 --&amp;gt; true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need it more often, put it into the script and create the values there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or at least use a variable similar to this:&lt;/P&gt;&lt;P&gt;MyYTD= "YTD= -1 OR MyDate &amp;gt;= '27.12.2010' and MyDate &amp;lt; '01.01.2011'"&lt;/P&gt;&lt;P&gt;And then in the expression sth like this:&lt;/P&gt;&lt;P&gt;sum(if( $(MyYTD), MyVal))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 12:20:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-in-Cyclic-Group/m-p/321129#M1191990</guid>
      <dc:creator />
      <dc:date>2011-06-27T12:20:02Z</dc:date>
    </item>
  </channel>
</rss>

