<?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 Concat a field with a sort on expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279064#M499230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jchoup,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;acc. to the manual, concat takes a third parameter for sort (should evaluate to numeric value, sort order is ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, without trying, a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concat (Distinct MyField, '|', sum(measure) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;might already do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2011 20:57:48 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-07-13T20:57:48Z</dc:date>
    <item>
      <title>Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279063#M499229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible, in the concat function, to use an expression in the sort-weight parameter ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concat( Distinct MyField, '|') works perfectly.&lt;/P&gt;&lt;P&gt;the string is sorted in an alphabetical order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to sort my field on an expression like Sum(Measure) ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 17:34:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279063#M499229</guid>
      <dc:creator>jchoucq</dc:creator>
      <dc:date>2011-07-13T17:34:57Z</dc:date>
    </item>
    <item>
      <title>Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279064#M499230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jchoup,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;acc. to the manual, concat takes a third parameter for sort (should evaluate to numeric value, sort order is ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, without trying, a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concat (Distinct MyField, '|', sum(measure) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;might already do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 20:57:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279064#M499230</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-13T20:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279065#M499231</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;&lt;/P&gt;&lt;P&gt;Thank you four your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this exactly what i've done, but it doesn't work.&lt;/P&gt;&lt;P&gt;It seems that the third paramater (sort-weight) must be a field and not an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the FirstSortedValue Function, i can get a field after sorting on an expression, but only the first one ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 06:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279065#M499231</guid>
      <dc:creator>jchoucq</dc:creator>
      <dc:date>2011-07-14T06:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279066#M499232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I noticed a thread answer by Johannes (&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/75544#75544"&gt;http://community.qlik.com/message/75544#75544&lt;/A&gt;&lt;SPAN&gt;) where the help file stated &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;The function argument expressions must not contain aggregation functions,&lt;/P&gt;&lt;P&gt;unless these inner aggregations contain the total qualifier. &lt;/P&gt;&lt;P&gt;For more advanced nested aggregations, please use the &lt;A _jive_internal="true" href="https://community.qlik.com/forums/Advanced_Aggregations.htm"&gt;aggr&lt;/A&gt; function in &lt;/P&gt;&lt;P&gt;combination with &lt;A _jive_internal="true" href="https://community.qlik.com/forums/Chart_Properties_Dimensions.htm#Calculated_dimensions"&gt;calculated dimensions&lt;/A&gt;.&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though I couldn't find that passage in my help to topic concat &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And indeed, sum( total Amount) as sort weight is a valid expression, but of course does not give a useful sort order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I tried with something like&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=concat( Distinct Salesman, ',' , -aggr( sum( Amount), Salesman))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which looks promising, but results in first an alphabetical ordered list of Salesman, then sum(amount) ordered list in one concatted string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strange, have to think about for another while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the moment, I added a fix with a right statement to get only the list of Salesman ordered by sum(amount).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work, though it looks a bit ugly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find attached my sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 10:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279066#M499232</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-14T10:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279067#M499233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For future reference, adding "nodistinct" to the inner aggr fixes the duplication problem (although I'm not sure why).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 16:01:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279067#M499233</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2013-08-27T16:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279068#M499234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this tip!&lt;/P&gt;&lt;P&gt;It was driving me crazy the duplication values even when I used the distinct command!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 15:25:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279068#M499234</guid>
      <dc:creator />
      <dc:date>2014-03-12T15:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279069#M499235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes&amp;nbsp; you can sort. Please find the attached sample application&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 22:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279069#M499235</guid>
      <dc:creator />
      <dc:date>2015-04-13T22:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279070#M499236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the right answer. Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 16:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/279070#M499236</guid>
      <dc:creator>coxanagi</dc:creator>
      <dc:date>2016-08-18T16:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Concat a field with a sort on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/1510836#M499237</link>
      <description>&lt;P&gt;you are right , but I want the sort order&amp;nbsp; is descending. how can i repsenct it!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 07:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-a-field-with-a-sort-on-expression/m-p/1510836#M499237</guid>
      <dc:creator>chenpeng</dc:creator>
      <dc:date>2018-11-22T07:24:27Z</dc:date>
    </item>
  </channel>
</rss>

