<?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: Load sales by max priority in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181255#M628275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think there is a faster way by playing only with the script. If however, the data source can be sorted, then you can perform a sorted read and get the max values in a single pass:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Main:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD AutoNumber(DeliveryPoint&amp;amp;[Product type]) as Key,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; DeliveryPoint,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [Product type],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Agent,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Priority,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; If(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeliveryPoint = Previous(DeliveryPoint) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; And [Product type] = Previous([Product type]), &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMax(Peek(MaxPriority), Priority), &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Priority&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ) as MaxPriority,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Sales&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM [Max priority sales.xlsx]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is ????1);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This assumes that the data source is sorted by DeliveryPoint and [Product type] (either ascending or descending) and by Priority in descending order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2016 06:25:57 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2016-09-13T06:25:57Z</dc:date>
    <item>
      <title>Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181248#M628268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;I have some simple load from xls.&lt;/P&gt;&lt;P&gt;Second operation - saving rows with max Priority field by group by function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script:&lt;/P&gt;&lt;P&gt;Main:&lt;/P&gt;&lt;P&gt;LOAD DeliveryPoint, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Product type], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Agent, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Priority, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Max priority sales.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Лист1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;right Join(Main)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;DeliveryPoint,&lt;/P&gt;&lt;P&gt;[Product type],&lt;/P&gt;&lt;P&gt;max(Priority) as Priority&lt;/P&gt;&lt;P&gt;Resident Main&lt;/P&gt;&lt;P&gt;Group by DeliveryPoint,&lt;/P&gt;&lt;P&gt;[Product type];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine, but in large volume data &lt;STRONG&gt;group by&lt;/STRONG&gt; function take too much time (more one hour).&lt;/P&gt;&lt;P&gt;Colleagues, is in QV some others ways to keep sales by following logic?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source file and model is attached.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:38:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181248#M628268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T13:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181249#M628269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if this is any faster&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Main:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD AutoNumber(DeliveryPoint&amp;amp;[Product type]) as Key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; DeliveryPoint, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Product type], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Agent, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Priority, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Max priority sales.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Лист1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalMain:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Main&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Key &amp;lt;&amp;gt; Previous(Key)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Key, Priority desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Main;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181249#M628269</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-12T13:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181250#M628270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in order to implement the same logic, u dont think we can exclude group by. But yes you can try with having a left join rather than having a right join and see whether it reduces your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181250#M628270</guid>
      <dc:creator>saimahasan</dc:creator>
      <dc:date>2016-09-12T13:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181251#M628271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks)&lt;/P&gt;&lt;P&gt;I'm going to check it tomorrow)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181251#M628271</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T13:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181252#M628272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for advice!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:57:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181252#M628272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T13:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181253#M628273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i've checked it.&lt;/P&gt;&lt;P&gt;It works more slowly, than group by operation &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 05:05:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181253#M628273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-13T05:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181254#M628274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know if there is a faster way to calculated max using a method mentioned here&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2013/09/fastest-method-to-read-maxfield-from-a-qvd/" title="http://qlikviewcookbook.com/2013/09/fastest-method-to-read-maxfield-from-a-qvd/"&gt;“Fastest” Method to Read max(field) From a QVD | Qlikview Cookbook&lt;/A&gt;‌. I have added a comment at the bottom for &lt;A href="https://community.qlik.com/qlik-users/2286"&gt;rwunderlich&lt;/A&gt;‌. Hopefully he can guide us for a way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 05:16:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181254#M628274</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-13T05:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181255#M628275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think there is a faster way by playing only with the script. If however, the data source can be sorted, then you can perform a sorted read and get the max values in a single pass:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Main:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD AutoNumber(DeliveryPoint&amp;amp;[Product type]) as Key,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; DeliveryPoint,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [Product type],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Agent,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Priority,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; If(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeliveryPoint = Previous(DeliveryPoint) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; And [Product type] = Previous([Product type]), &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMax(Peek(MaxPriority), Priority), &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Priority&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ) as MaxPriority,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Sales&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM [Max priority sales.xlsx]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is ????1);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This assumes that the data source is sorted by DeliveryPoint and [Product type] (either ascending or descending) and by Priority in descending order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181255#M628275</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-09-13T06:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181256#M628276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reread your OP and I see you want to filter for the maximum priority values...&lt;/P&gt;&lt;P&gt;Well if the data can be sorted at source again, then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Main:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD AutoNumber(DeliveryPoint&amp;amp;[Product type]) as Key,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; DeliveryPoint,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [Product type],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Agent,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Priority,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Sales&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM [Max priority sales.xlsx]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is ????1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Where Not(Exists(Key));&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181256#M628276</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-09-13T06:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load sales by max priority</title>
      <link>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181257#M628277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't understand, how i can use these code? For already sorted data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 13:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-sales-by-max-priority/m-p/1181257#M628277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-13T13:09:48Z</dc:date>
    </item>
  </channel>
</rss>

