<?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: Order By does not impact Distinct Load. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132334#M632995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don´t think it´s available since is proprietary code from Qlik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2016 12:16:15 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2016-06-06T12:16:15Z</dc:date>
    <item>
      <title>Order By does not impact Distinct Load.</title>
      <link>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132331#M632992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12.8px; font-family: arial, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="color: #575757;"&gt;PFA the test data (a single column) that is not getting sorted when we write the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #575757;"&gt;&lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;LOAD x&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;[..\..\..\..\..\..\Downloads\TestData.xls]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;(biff, embedded labels, table is Sheet1$);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;NoConcatenate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;load distinct * Resident D&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Order by x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;drop Table D;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;IMG alt="Inline image 1" class="jive-image CToWUd" height="257" src="https://mail.google.com/mail/u/1/?ui=2&amp;amp;ik=c470fd260c&amp;amp;view=fimg&amp;amp;th=1552515146f901b9&amp;amp;attid=0.0.1&amp;amp;disp=emb&amp;amp;realattid=ii_1552513289fccfb1&amp;amp;attbid=ANGjdJ_PgFaXPmOHfOnKay8g4X88O5TsvwWMmUh-X3b2IWK_y_Sa9x8TIy5bu8QQh5cMPpK18nyMBu6fO4e_4xsPHLY5MhUs23zNWY6aRa-r29t0sezO8oAEIB1SIig&amp;amp;sz=w156-h514&amp;amp;ats=1465210566816&amp;amp;rm=1552515146f901b9&amp;amp;zw&amp;amp;atsh=1" width="78" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;I know that Order By executes before Load. Thus accordingly, Load Distinct should be applied on the sorted column x which should in turn return the sorted Distinct values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12.8px; font-family: arial, sans-serif;"&gt;It would be really helpful if you could help me tell why it is not getting sorted.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 11:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132331#M632992</guid>
      <dc:creator>agpolestar</dc:creator>
      <dc:date>2016-06-06T11:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Order By does not impact Distinct Load.</title>
      <link>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132332#M632993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It´s a known behavior.&lt;/P&gt;&lt;P&gt;There´s one idea about future versions &lt;A __default_attr="3272" __jive_macro_name="idea" class="jive_macro jive_macro_idea" data-orig-content="Have a &amp;quot;DISTINCT&amp;quot; and &amp;quot;ORDER BY&amp;quot; working on script" href="https://community.qlik.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 11:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132332#M632993</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-06T11:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Order By does not impact Distinct Load.</title>
      <link>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132333#M632994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Clever Anjos. However, I am intrigued about the code library that runs for Distinct Clause. Can we get the code for it anywhere ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 11:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132333#M632994</guid>
      <dc:creator>agpolestar</dc:creator>
      <dc:date>2016-06-06T11:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Order By does not impact Distinct Load.</title>
      <link>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132334#M632995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don´t think it´s available since is proprietary code from Qlik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 12:16:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132334#M632995</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-06T12:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Order By does not impact Distinct Load.</title>
      <link>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132335#M632996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a workaround to keep the sort order, you can use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD x as xTemp&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;[TestData.xls]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(biff, embedded labels, table is Sheet1$);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;x:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD xTemp as x&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident TMP&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;WHERE NOT EXISTS(x,xTemp)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ORDER BY xTemp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP TABLE TMP;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 14:03:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132335#M632996</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-06T14:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Order By does not impact Distinct Load.</title>
      <link>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132336#M632997</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;can you please explain you solution? What I find confusing is that the 1st parameter of exists is &lt;STRONG&gt;x&lt;/STRONG&gt;, even though it was renamed in TMP to xTemp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="script_token" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold; font-size: 12px; color: #0f0f0f;"&gt;Exists(&lt;/SPAN&gt;&lt;SPAN class="bnf_token" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; color: #0f0f0f;"&gt;field_name [, expr]&lt;/SPAN&gt;&lt;SPAN class="script_token" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold; font-size: 12px; color: #0f0f0f;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE cellspacing="0" class="TableStyle-tableGrid" style="margin-bottom: 15px; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px;"&gt;&lt;TBODY style="border-top-width: 2px; border-top-color: #0f0f0f;"&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyI--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;field_name&lt;/TD&gt;&lt;TD class="BodyG--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;A name or a string expression evaluating to a field name to be searched for. The field must exist in the data loaded so far by the script.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Mykola.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 15:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-By-does-not-impact-Distinct-Load/m-p/1132336#M632997</guid>
      <dc:creator>masismykola</dc:creator>
      <dc:date>2018-01-25T15:26:13Z</dc:date>
    </item>
  </channel>
</rss>

