<?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 Relative evolution with oldest value as reference point in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280698#M1177287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script part is identical to the one I posted here:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/thread/47196"&gt;http://community.qlik.com/thread/47196&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then just create a line chart with dimensions Date and Product and 1 expression like posted above:&lt;/P&gt;&lt;P&gt;=sum(Value) / FirstSortedValue(total&amp;lt;Product&amp;gt; Value, Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result looks like&lt;/P&gt;&lt;P&gt;&lt;IMG alt="ProductPriceLinechart.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/11252_ProductPriceLinechart.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using more than one expression? Line charts are pretty limited in displaying multiple dimensions / expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 12:50:48 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-02-14T12:50:48Z</dc:date>
    <item>
      <title>Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280692#M1177274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to create a graph which shows the evolution of values of different products in time, relative to the oldest value (earliest time stamp, which is not necessarily on the first row of the source tabel) of the source data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data are given in intervals, but this issue has been solved by Swuehl. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I already have a graph showing the absolute evolution of the data in time. As a next step, I'd like them to be compared to the first value of the corresponding product, because of the wide range of absolute values. Furthermore, the relative changes are on a same level so this graphic shoud become more interesting this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone have a suggestion on how to clear this issue ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for the ideas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 11:07:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280692#M1177274</guid>
      <dc:creator />
      <dc:date>2012-02-14T11:07:27Z</dc:date>
    </item>
    <item>
      <title>Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280693#M1177276</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'm not sure if I grasped the problem completely. But you should sort your fact table by date/time. In order to read data linked to first and/or last available date in your selections, use the FIRSTSORTEDVALUE function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sebablum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 11:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280693#M1177276</guid>
      <dc:creator />
      <dc:date>2012-02-14T11:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280694#M1177278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like attached? I just replaced the expression with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(Value) / FirstSortedValue(total&amp;lt;Product&amp;gt; Value, Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: removed the aggr(), not needed here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 11:23:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280694#M1177278</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-14T11:23:22Z</dc:date>
    </item>
    <item>
      <title>Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280695#M1177281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this formula, but as a result I only become the requested line for just 1 product. The other products are not shown. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stijn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 11:36:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280695#M1177281</guid>
      <dc:creator />
      <dc:date>2012-02-14T11:36:26Z</dc:date>
    </item>
    <item>
      <title>Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280696#M1177283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at my sample? There is a list box with Product values. Have you cleared the selection? My sample seems to work at my place. Or are you talking about different data set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 11:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280696#M1177283</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-14T11:41:16Z</dc:date>
    </item>
    <item>
      <title>Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280697#M1177285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hey Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got problems opening your sample. Perhaps because I currently use the personal edition, which doesn't allow to open files made by others. Could you perhaps post the programming on the forum (or as screenshot) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help. The data are not the ones I posted, but are similar. The headings are the same though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280697#M1177285</guid>
      <dc:creator />
      <dc:date>2012-02-14T12:30:32Z</dc:date>
    </item>
    <item>
      <title>Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280698#M1177287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script part is identical to the one I posted here:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/thread/47196"&gt;http://community.qlik.com/thread/47196&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then just create a line chart with dimensions Date and Product and 1 expression like posted above:&lt;/P&gt;&lt;P&gt;=sum(Value) / FirstSortedValue(total&amp;lt;Product&amp;gt; Value, Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result looks like&lt;/P&gt;&lt;P&gt;&lt;IMG alt="ProductPriceLinechart.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/11252_ProductPriceLinechart.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using more than one expression? Line charts are pretty limited in displaying multiple dimensions / expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280698#M1177287</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-14T12:50:48Z</dc:date>
    </item>
    <item>
      <title>Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280699#M1177289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have overlapping / same intervals for the same Product? For example, is 'unit' something like a subgroup of product? Could you extend your sample data that it match your actual data layout?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FirstSortedValue will not work if you could have several Values for one given date, like same or overlapping intervals per Product.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 15:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280699#M1177289</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-14T15:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280700#M1177290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You indeed have overlapping intervals, so I think you should clarify how to handle the 1 day your intervals overlap (which value to take for that date). That's the reason why you get the outlier at those days when using the sum(Value) expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you want to use the value from the ending interval, you could use [I had some problems loading your excel file, so you might need to adjust the first load]:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMPPRODUCT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Product, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [m max unit/h], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unit, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [valid from], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [valid until], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [mmax from here]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Mmax_PEOL_v3.xls.xlsx&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is Sheet1);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Product:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NOCONCATENATE LOAD Product, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [m max unit/h], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unit, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Peek(Product)=Product and peek([valid until])=[valid from], [valid from]+1, [valid from]) as [valid from], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [valid until], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [mmax from here]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident TMPPRODUCT order by Product, [valid from];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table TMPPRODUCT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Calendar:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date(makedate(2010)+RecNo()-1) as Date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;autogenerate 1000;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IntervalMatch (Date) Load [valid from], [valid until] resident Product;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if you want to use the value from the coming period, you need to change the sort order of [valid from] and change the LOAD to&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Product:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NOCONCATENATE LOAD Product, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [m max unit/h], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unit, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Peek(Product)=Product and [valid until]=peek([valid from]), [valid until]-1, [valid until]) as [valid until], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [valid from], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [mmax from here]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident TMPPRODUCT order by Product, [valid from] desc;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will correct your absolute value display per Date and Product, but that was not the problem with the relative display, we need to use [valid from] as sort weight to FirstSortedValue, use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=[m max unit/h] / FirstSortedValue(total&amp;lt;Product&amp;gt; [m max unit/h], [valid from])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression in your chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the sample app, though you can't really use it with your personal edition without losing a recovery attempt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 17:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280700#M1177290</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-14T17:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Relative evolution with oldest value as reference point</title>
      <link>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280701#M1177291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again for this helpful solution. The result is as I wished it !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 09:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Relative-evolution-with-oldest-value-as-reference-point/m-p/280701#M1177291</guid>
      <dc:creator />
      <dc:date>2012-02-16T09:32:21Z</dc:date>
    </item>
  </channel>
</rss>

