<?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: Sort Table By Specified Column Selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453864#M169363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use the sample Gysbert provided. I essentially use the same sorting method by joining a pre-sorted QVD with my existing table. The formula used is also provided in a table. =$(=SortExp)&amp;nbsp; you specify the sort exp in a separate table and place the field in the Sort field.&amp;nbsp; Then when you select form lsit box is will select the proper expression to sort on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provide a screenshot or sample QVW for more assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jun 2013 13:32:49 GMT</pubDate>
    <dc:creator>b_garside</dc:creator>
    <dc:date>2013-06-12T13:32:49Z</dc:date>
    <item>
      <title>Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453855#M169354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to sort a Straight Table by, depending on the user column selection.&lt;/P&gt;&lt;P&gt;If possible, I would like to do so via a macro, as the same user selection will be applied to several charts (easier to copy to the other charts).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user can select 1 of 3 criteria, which is stored in a variable 'Order_By'.&lt;/P&gt;&lt;P&gt;Then I tried using the macro below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sub Order_By&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ActiveDocument.Variables("Order_By").GetContent.String = "SIR No" Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.GetSheetObject("Table_All").SortBy 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ActiveDocument.Variables("Order_By").GetContent.String = "Application" Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.GetSheetObject("Table_All").SortBy 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ActiveDocument.Variables("Order_By").GetContent.String = "Status" Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.GetSheetObject("Table_All").SortBy 33&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't fully work.&lt;/P&gt;&lt;P&gt;Also it seems to mess up the 'Sort By Columns Priority', if I take a look at the chart properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can achieve a simple sort by a specified column ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 15:55:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453855#M169354</guid>
      <dc:creator />
      <dc:date>2012-12-19T15:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453856#M169355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest avoiding macros whenever possible. See if the attached file is kind of what you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 16:11:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453856#M169355</guid>
      <dc:creator />
      <dc:date>2012-12-19T16:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453857#M169356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great Solution Rebecca!&amp;nbsp; Im going to try this as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 18:44:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453857#M169356</guid>
      <dc:creator>b_garside</dc:creator>
      <dc:date>2013-05-23T18:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453858#M169357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca, do you know how I would sort a Project list that is text based vs Numerical?&lt;/P&gt;&lt;P&gt;Does it need a function like &lt;STRONG&gt;MinString&lt;/STRONG&gt; or just the Field value its self?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp; aMonth field that wont sort unless I move it to the top of the Sort list. I used Num to ensure it was numerical when using Sum but that wont work when used my expression completely. Is kind of sorts but not until I promote it to the top.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 16:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453858#M169357</guid>
      <dc:creator>b_garside</dc:creator>
      <dc:date>2013-05-24T16:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453859#M169358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so I figured out one way that may help you.&amp;nbsp; I created a new field that uses Ord() to give each SalesRepName a numeric ranking and then used that field in the %Calc field.&amp;nbsp; Note that it will only be alphabetical through the third character of the text string unless you add to my formula.&amp;nbsp; Hope it helps!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 21:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453859#M169358</guid>
      <dc:creator />
      <dc:date>2013-05-24T21:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453860#M169359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;Gysbert Wassenaar&lt;/A&gt;, &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;, &lt;A href="https://community.qlik.com/qlik-users/3931"&gt;Michael Solomovich&lt;/A&gt;... do you guys have any better ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 21:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453860#M169359</guid>
      <dc:creator />
      <dc:date>2013-05-24T21:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453861#M169360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, just a minor change. As far as I can tell it's possible to use rank(Sales Rep) to sort the Sales Rep field. The Ord field won't be necessary then. Or you could first load the sales reps in a temp table, then sort it and store it in a qvd and finally load the sales reps again from the qvd and join it with the rest of the data. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 May 2013 07:08:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453861#M169360</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-25T07:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453862#M169361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both!&amp;nbsp; Very Clever. Sorting it in the Script really helped. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 14:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453862#M169361</guid>
      <dc:creator>b_garside</dc:creator>
      <dc:date>2013-05-28T14:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453863#M169362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i have also same problem of sorting. I am using pivot table and i want to sort 2nd column as per selection but it's working wiyh abve logic can u pls help me in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 12:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453863#M169362</guid>
      <dc:creator />
      <dc:date>2013-06-12T12:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453864#M169363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use the sample Gysbert provided. I essentially use the same sorting method by joining a pre-sorted QVD with my existing table. The formula used is also provided in a table. =$(=SortExp)&amp;nbsp; you specify the sort exp in a separate table and place the field in the Sort field.&amp;nbsp; Then when you select form lsit box is will select the proper expression to sort on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provide a screenshot or sample QVW for more assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 13:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453864#M169363</guid>
      <dc:creator>b_garside</dc:creator>
      <dc:date>2013-06-12T13:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Table By Specified Column Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453865#M169364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Hello Rebecca . I'm trying to run what do you showed in the example ... I need to sort the columns Cause value and value payment is made .. can help me ...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 13:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-Table-By-Specified-Column-Selection/m-p/453865#M169364</guid>
      <dc:creator>acandido84</dc:creator>
      <dc:date>2016-06-14T13:03:01Z</dc:date>
    </item>
  </channel>
</rss>

