<?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 for comparing multiple years in bar chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208642#M23122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I do the above, Qlik Sense says "invalid Dimension"&lt;/P&gt;&lt;P&gt;I probably put something in the wrong place, so just to repeat:&lt;/P&gt;&lt;P&gt;1) I added the text:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; InYearToDate(SetDateYear(Date, Year(Today())), Today(), 0) as YTD_Flag;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(2010, 12, 31) + IterNo()) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While IterNo() &amp;lt;= Today() - MakeDate(2010, 12, 31);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into the script. I did not put it at the end of the auto-generated load script as I would have to unlock the script and there was a warning that I could not use the data manager when I unlock it and it can not be re-locked again. Instead, I added a new section in the script where I put the above text.&lt;/P&gt;&lt;P&gt;After saving the script, I reloaded my data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I put&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;YTD_Flag *= {-1}&amp;gt;} Operateur)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;into my field for the second dimension, the first being Year(Date).&lt;/P&gt;&lt;P&gt;When I do that, it says: "error in formula"??&lt;/P&gt;&lt;P&gt;I also tried variations, like&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Year({&amp;lt;YTD_Flag *= {-1}&amp;gt;} Date)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; put that into pretty much all boxes that I could find.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sometimes that would give me an "invalid dimension", at other times an "internal error"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Oct 2016 09:54:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-09T09:54:02Z</dc:date>
    <item>
      <title>YTD for comparing multiple years in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208640#M23120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is driving me crazy:&lt;/P&gt;&lt;P&gt;my chart looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="338a4459225f4f18a74471d2a624bdc5.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/140078_338a4459225f4f18a74471d2a624bdc5.png" style="height: 306px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;The first dimension is: Year (Date)&lt;/P&gt;&lt;P&gt;Comparison can not be done as 2016 is incomplete, i.e. we are still in 2016.&lt;/P&gt;&lt;P&gt;How do I display data for all years up to the day/month of the last input for the current year (2016)?&lt;/P&gt;&lt;P&gt;I´ve been reading all help files, blogs, etc but could not solve this in three days!!&lt;/P&gt;&lt;P&gt;There seems to be a very convoluted / insanely complicated scripting language in Qlik and the diagrams just don´t look right.&lt;/P&gt;&lt;P&gt;Another thing: why are values not shown in the stacks?? There is enough room!&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Oct 2016 13:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208640#M23120</guid>
      <dc:creator />
      <dc:date>2016-10-08T13:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: YTD for comparing multiple years in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208641#M23121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be create a YTD Flag in the script which goes through the maximum date in the most recent year. May be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; InYearToDate(SetDateYear(Date, Year(Today())), Today(), 0) as YTD_Flag;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(2010, 12, 31) + IterNo()) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While IterNo() &amp;lt;= Today() - MakeDate(2010, 12, 31);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, each year until October 9th the YTD_Flag = -1 and rest of year YTD_Flag = 0. So now in your set analysis, you can just do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;YTD_Flag = {-1}&amp;gt;} Measure)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this if you wish to further drill down on selections you make&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Sum({&amp;lt;YTD_Flag *= {-1}&amp;gt;} Measure)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Oct 2016 04:55:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208641#M23121</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-09T04:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: YTD for comparing multiple years in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208642#M23122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I do the above, Qlik Sense says "invalid Dimension"&lt;/P&gt;&lt;P&gt;I probably put something in the wrong place, so just to repeat:&lt;/P&gt;&lt;P&gt;1) I added the text:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; InYearToDate(SetDateYear(Date, Year(Today())), Today(), 0) as YTD_Flag;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(2010, 12, 31) + IterNo()) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While IterNo() &amp;lt;= Today() - MakeDate(2010, 12, 31);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into the script. I did not put it at the end of the auto-generated load script as I would have to unlock the script and there was a warning that I could not use the data manager when I unlock it and it can not be re-locked again. Instead, I added a new section in the script where I put the above text.&lt;/P&gt;&lt;P&gt;After saving the script, I reloaded my data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I put&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;YTD_Flag *= {-1}&amp;gt;} Operateur)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;into my field for the second dimension, the first being Year(Date).&lt;/P&gt;&lt;P&gt;When I do that, it says: "error in formula"??&lt;/P&gt;&lt;P&gt;I also tried variations, like&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Year({&amp;lt;YTD_Flag *= {-1}&amp;gt;} Date)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; put that into pretty much all boxes that I could find.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sometimes that would give me an "invalid dimension", at other times an "internal error"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Oct 2016 09:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208642#M23122</guid>
      <dc:creator />
      <dc:date>2016-10-09T09:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: YTD for comparing multiple years in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208643#M23123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why would you put Count() in your dimension? I wanted you to use the set analysis in your expression. Can you try this in your expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2016 11:16:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208643#M23123</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-10T11:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: YTD for comparing multiple years in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208644#M23124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;count({$ &amp;lt;Date={"=DayNumberOfYear(Date)&amp;lt;=DayNumberOfYear(Today())"}&amp;gt;} Measure)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2016 11:35:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208644#M23124</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-10-10T11:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: YTD for comparing multiple years in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208645#M23125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Big thank you to Massimo Grossi, that´s it!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 12:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-for-comparing-multiple-years-in-bar-chart/m-p/1208645#M23125</guid>
      <dc:creator />
      <dc:date>2016-10-12T12:49:35Z</dc:date>
    </item>
  </channel>
</rss>

