<?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: calculation of Minimum dates using group by clauses. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777226#M454955</link>
    <description>&lt;P&gt;Hi Edwin,&lt;/P&gt;&lt;P&gt;Thanks for your valuable suggestion. I am looking forward to reducing the overall reload time.&lt;/P&gt;&lt;P&gt;But, moving the logic to the ETL side would be a time-consuming task.&lt;/P&gt;&lt;P&gt;If we can use variables for min and max dates and use the same variable wherever possible.&lt;/P&gt;&lt;P&gt;Will that help. Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2021 17:04:18 GMT</pubDate>
    <dc:creator>deepaktibhe</dc:creator>
    <dc:date>2021-01-25T17:04:18Z</dc:date>
    <item>
      <title>calculation of Minimum dates using group by clauses.</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777010#M454945</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the condition that is being used in our application.&lt;/P&gt;&lt;P&gt;[Factory KPI]:&lt;BR /&gt;LOAD *&lt;BR /&gt;WHERE Not IsNull ([Factory KPI Status]);&lt;BR /&gt;LOAD [Sales Document Item Key],&lt;BR /&gt;'Production' as [Factory KPI Group],&lt;BR /&gt;'Late to Production SO Stock' as [Factory KPI],&lt;BR /&gt;If ([Production Order DLV Date] &amp;gt; [Basic Finish Date], 'Action', 'OK') as [Factory KPI Status];&lt;BR /&gt;&lt;STRONG&gt;LOAD [Sales Document Item Key],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Min ([Production Order DLV Date]) as [Production Order DLV Date], &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Min ([Basic Finish Date]) as [Basic Finish Date]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;RESIDENT Temp&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;GROUP BY [Sales Document Item Key];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It seems that the highlighted part consumes a long reload time.&lt;/P&gt;&lt;P&gt;Can you please suggest some alternative ways to get rid of this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777010#M454945</guid>
      <dc:creator>deepaktibhe</dc:creator>
      <dc:date>2024-11-15T23:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: calculation of Minimum dates using group by clauses.</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777203#M454952</link>
      <description>&lt;P&gt;if you have a huge data set, you may want to move this logic (the entire code above) to your data layer (possibly an ETL) this may be easy for a data base server.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 15:59:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777203#M454952</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-25T15:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: calculation of Minimum dates using group by clauses.</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777226#M454955</link>
      <description>&lt;P&gt;Hi Edwin,&lt;/P&gt;&lt;P&gt;Thanks for your valuable suggestion. I am looking forward to reducing the overall reload time.&lt;/P&gt;&lt;P&gt;But, moving the logic to the ETL side would be a time-consuming task.&lt;/P&gt;&lt;P&gt;If we can use variables for min and max dates and use the same variable wherever possible.&lt;/P&gt;&lt;P&gt;Will that help. Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 17:04:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777226#M454955</guid>
      <dc:creator>deepaktibhe</dc:creator>
      <dc:date>2021-01-25T17:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: calculation of Minimum dates using group by clauses.</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777249#M454959</link>
      <description>&lt;P&gt;at the end of the day, if you need to get the min of those dates per sales doc item key, then you will have to do an aggregation.&amp;nbsp; variables will not work here as a variable can only contain a single value and cramming multiple values in a single variable would be complex and time consuming to parse.&lt;/P&gt;&lt;P&gt;you are aware that preloads are executed last to first.&amp;nbsp; meaning the aggregation will execute before the one with the where clause&amp;nbsp;WHERE Not IsNull ([Factory KPI Status]);&lt;/P&gt;&lt;P&gt;perhaps (and you need to benchmark this), you can move the criteria to the first load statement.&amp;nbsp; and i think the only case when&amp;nbsp;Factory KPI Status is null is when a sales item id has no [Production Order DLV Date] or&amp;nbsp; no [Basic Finish Date]&lt;BR /&gt;-&amp;gt; which means min of either will be null&lt;BR /&gt;-&amp;gt; which means&amp;nbsp;&amp;nbsp;[Factory KPI Status] will be null&lt;BR /&gt;and since you apparently dont need it, remove it at the start.&amp;nbsp; it reduces the volume and reduces the loads&lt;/P&gt;&lt;P&gt;so to reduce the aggregation add a where clause&lt;/P&gt;&lt;P&gt;WHERE not isnull([Production Order DLV Date]) and not isnull([Basic Finish Date])&lt;/P&gt;&lt;P&gt;and you dont need the first load statement:&lt;BR /&gt;LOAD *&lt;BR /&gt;WHERE Not IsNull ([Factory KPI Status]);&lt;/P&gt;&lt;P&gt;of course this will have to be tested and your data profiled: are there a lot of sales item id with null dates?&amp;nbsp; if the answer is no there will always be a date then the first load statement is not needed as the field&amp;nbsp;[Factory KPI Status]&amp;nbsp; will never be null.&amp;nbsp; thats what i mean by profiling&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 19:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-of-Minimum-dates-using-group-by-clauses/m-p/1777249#M454959</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-25T19:26:11Z</dc:date>
    </item>
  </channel>
</rss>

