<?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 Load order in Concat() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-order-in-Concat-function/m-p/946758#M326061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While helping someone on the community (&lt;A href="https://community.qlik.com/thread/196970"&gt;First Function() in a table graph&lt;/A&gt;), I stumbled across a scenario where I wanted to use Concat() function and wanted to sort is by load order. I know this can be done easily by adding a RecNo() or RowNo() in the script. But the idea is if I don't want to make changes in the script, is it still possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought of using Aggr() function, as Stefan (&lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌‌) once mentioned in a post that Aggr() function usually sorts by load order. But that doesn't seem to be true in this particular case. Have a look at the attached sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim1, Val1, Val2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a, ak3, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a, ak1, 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a, ak5, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;b, ak4, 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;b, ak2, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried these expressions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT Val1, ', ')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT Val2, ', ')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(Concat(DISTINCT Val1, ', '), Dim1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(Concat(DISTINCT Val2, ', '), Dim1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The order for Expression1 and 3 I am getting is this -&amp;gt; ak1, ak3, ak5 and I am looking for -&amp;gt; ak3, ak1, ak5 when Dim1 = a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="109273" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109273_Capture.PNG" style="height: 150px; width: 620px;" /&gt;&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>Thu, 17 Dec 2015 11:16:05 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-12-17T11:16:05Z</dc:date>
    <item>
      <title>Load order in Concat() function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-order-in-Concat-function/m-p/946758#M326061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While helping someone on the community (&lt;A href="https://community.qlik.com/thread/196970"&gt;First Function() in a table graph&lt;/A&gt;), I stumbled across a scenario where I wanted to use Concat() function and wanted to sort is by load order. I know this can be done easily by adding a RecNo() or RowNo() in the script. But the idea is if I don't want to make changes in the script, is it still possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought of using Aggr() function, as Stefan (&lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌‌) once mentioned in a post that Aggr() function usually sorts by load order. But that doesn't seem to be true in this particular case. Have a look at the attached sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim1, Val1, Val2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a, ak3, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a, ak1, 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a, ak5, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;b, ak4, 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;b, ak2, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried these expressions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT Val1, ', ')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT Val2, ', ')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(Concat(DISTINCT Val1, ', '), Dim1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(Concat(DISTINCT Val2, ', '), Dim1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The order for Expression1 and 3 I am getting is this -&amp;gt; ak1, ak3, ak5 and I am looking for -&amp;gt; ak3, ak1, ak5 when Dim1 = a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="109273" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109273_Capture.PNG" style="height: 150px; width: 620px;" /&gt;&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>Thu, 17 Dec 2015 11:16:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-order-in-Concat-function/m-p/946758#M326061</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-17T11:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Load order in Concat() function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-order-in-Concat-function/m-p/946759#M326062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I found the solution to my problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT Val1, ', ', Aggr(RowNo(), Dim1, Val1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109277_Capture.PNG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 11:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-order-in-Concat-function/m-p/946759#M326062</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-17T11:30:29Z</dc:date>
    </item>
  </channel>
</rss>

