<?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: Why does it work... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-does-it-work/m-p/1513488#M749689</link>
    <description>&lt;P&gt;I am just reading your question&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56399"&gt;@Thea&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;My question:&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone help me understand the logic that is embeded in the background that would explain the above described behavior? &lt;STRONG&gt;Why did I have to sort my source data&lt;/STRONG&gt; in order to get the needed results?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thea&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Because you use aggr(), and aggr() works on &lt;STRONG&gt;reload order.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2018 09:56:29 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2018-11-28T09:56:29Z</dc:date>
    <item>
      <title>Why does it work...</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-it-work/m-p/1513477#M749687</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I don't really have an issue to be solved, but more of a question about the background logic of Qlik.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The issue:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I had to create a&amp;nbsp;timeline chart with a cycle where the user can switch between week, month, quarter and year.&amp;nbsp;I am working with snapshot/ point n time data, so for each period I had to get the value from the last date of the respective period. I addition, if the user is looking at the year view and selects a period before the year end date, the values from the last date from the selected period should be shown in the chart.&amp;nbsp;My calendar is in a different table and links to my fact table through a surrogate key field for the date. In order to identify the last date for each period I am using &amp;nbsp;the max(refdate), which works perfectly when you add it in an expression or calculated dimension, but not when&amp;nbsp;you try to put it in a set analysis.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My solution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I created an aggregation for the &lt;SPAN&gt;max(refdate) by the current field from the cycle group, which looked like that:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;aggr(max(REFDATE),$(vTimeSeries))&lt;/STRONG&gt;&lt;/EM&gt;, where&lt;EM&gt;&amp;nbsp;&lt;STRONG&gt;vTimeSeries =&amp;nbsp;getcurrentfield(CycleGroup)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So far so good, but my numbers would not align. After some digging I found out that for some reason the&amp;nbsp;&amp;nbsp;calculation was applied to the wrong date. Some more digging later, it turned out that the calculation was always applied to the date that was first loaded. After doing an &lt;STRONG&gt;order by&lt;/STRONG&gt; refdate &lt;STRONG&gt;desc&lt;/STRONG&gt; in the load script of my qvd generator, all was finally aligning.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;My question:&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone help me understand the logic that is embeded in the background that would explain the above described behavior? Why did I have to sort my source data in order to get the needed results?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thea&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-it-work/m-p/1513477#M749687</guid>
      <dc:creator>Thea</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why does it work...</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-it-work/m-p/1513488#M749689</link>
      <description>&lt;P&gt;I am just reading your question&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56399"&gt;@Thea&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;My question:&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone help me understand the logic that is embeded in the background that would explain the above described behavior? &lt;STRONG&gt;Why did I have to sort my source data&lt;/STRONG&gt; in order to get the needed results?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thea&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Because you use aggr(), and aggr() works on &lt;STRONG&gt;reload order.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 09:56:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-it-work/m-p/1513488#M749689</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-11-28T09:56:29Z</dc:date>
    </item>
  </channel>
</rss>

