<?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: How to change sort order dynamically? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-change-sort-order-dynamically/m-p/721375#M259057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this works but maybe you could create an island table with a field of all the different sorts you want.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then in the expression sort use the Pick(Match(SortDimension,'Custom Sort 1', 'Custom Sort 2', etc),Custom Sort Equation1, Custom Sort Equation 2, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put the SortDimension Field in you application and users can select the customer sorts in the list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Use Rob's Solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jul 2014 22:55:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-07-21T22:55:59Z</dc:date>
    <item>
      <title>How to change sort order dynamically?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-sort-order-dynamically/m-p/721373#M259055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; There are many differenet ways to sort in Qlikview charts such as Y-Value, Text, Frequency, State, even Expression. The static sort can be easily done. My questions is how to make the sorting dynamic. I want to allow users to select sorting methods such as&amp;nbsp; Y-value and Text in Qlikview by clicking a button. Is this doable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Longmatch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 22:04:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-sort-order-dynamically/m-p/721373#M259055</guid>
      <dc:creator />
      <dc:date>2014-07-21T22:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to change sort order dynamically?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-sort-order-dynamically/m-p/721374#M259056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can leverage the "Sort by Expression" option and compute a sort order based on user input. For example, create a button that uses the Set Variable action to toggle a variable "vSort_FieldName".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(vSort_FieldName='name','freq','name')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the object you want to sort, you can use a Sort Expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if('$(vSort_FieldName)'='name'&lt;/P&gt;&lt;P&gt;,''&lt;/P&gt;&lt;P&gt;,count([someField]) // Sort by Freq&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For an example of this, see the listboxes on the "QVD Fields" sheet in the attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 22:46:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-sort-order-dynamically/m-p/721374#M259056</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-07-21T22:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to change sort order dynamically?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-sort-order-dynamically/m-p/721375#M259057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this works but maybe you could create an island table with a field of all the different sorts you want.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then in the expression sort use the Pick(Match(SortDimension,'Custom Sort 1', 'Custom Sort 2', etc),Custom Sort Equation1, Custom Sort Equation 2, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put the SortDimension Field in you application and users can select the customer sorts in the list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Use Rob's Solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 22:55:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-sort-order-dynamically/m-p/721375#M259057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-21T22:55:59Z</dc:date>
    </item>
  </channel>
</rss>

