<?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 How to sort the pivot table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-sort-the-pivot-table/m-p/398915#M1162865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I am not able to Sort in that pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Pivot table like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="23220" class="jive-image-thumbnail jive-image" onclick="" alt="Capture13.PNG" src="https://community.qlik.com/legacyfs/online/23220_Capture13.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And sort tab of my pivot table like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="23221" class="jive-image-thumbnail jive-image" onclick="" alt="Capture14.PNG" src="https://community.qlik.com/legacyfs/online/23221_Capture14.PNG" width="450" /&gt;&lt;IMG __jive_id="23222" class="jive-image-thumbnail jive-image" onclick="" alt="Capture15.PNG" src="https://community.qlik.com/legacyfs/online/23222_Capture15.PNG" width="450" /&gt;&lt;IMG __jive_id="23223" class="jive-image-thumbnail jive-image" onclick="" alt="Capture16.PNG" src="https://community.qlik.com/legacyfs/online/23223_Capture16.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I have like this but Sorting is not worked in my pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to sort in the pivot table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three dimension , that's why I have a problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kabilan K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2012 11:47:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-10T11:47:21Z</dc:date>
    <item>
      <title>How to sort the pivot table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sort-the-pivot-table/m-p/398915#M1162865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I am not able to Sort in that pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Pivot table like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="23220" class="jive-image-thumbnail jive-image" onclick="" alt="Capture13.PNG" src="https://community.qlik.com/legacyfs/online/23220_Capture13.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And sort tab of my pivot table like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="23221" class="jive-image-thumbnail jive-image" onclick="" alt="Capture14.PNG" src="https://community.qlik.com/legacyfs/online/23221_Capture14.PNG" width="450" /&gt;&lt;IMG __jive_id="23222" class="jive-image-thumbnail jive-image" onclick="" alt="Capture15.PNG" src="https://community.qlik.com/legacyfs/online/23222_Capture15.PNG" width="450" /&gt;&lt;IMG __jive_id="23223" class="jive-image-thumbnail jive-image" onclick="" alt="Capture16.PNG" src="https://community.qlik.com/legacyfs/online/23223_Capture16.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I have like this but Sorting is not worked in my pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to sort in the pivot table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three dimension , that's why I have a problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kabilan K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 11:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sort-the-pivot-table/m-p/398915#M1162865</guid>
      <dc:creator />
      <dc:date>2012-10-10T11:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort the pivot table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sort-the-pivot-table/m-p/398916#M1162866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The Goal: &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sort expression columns in a pivot table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The Method:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;1. Create variables for the expressions you want to sort by&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 36.0pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt; LET&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vEqProjectBaseline&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 'Sum([BackingSheetHours]) /7.5';&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vEqEstimate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 'Sum(Aggr([Estimated Hours], ProjectTaskKey)) /7.5';&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vEqBaselineVsEstimate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = '($(vEqEstimate)) / ($(vEqProjectBaseline))'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N.B – brackets and apostrophes are a real minefield&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Create function to evaluate the variables inline&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;fxEval&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = Evaluate($1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;3. Create the custom sort table:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; CustomSorting:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;%DisplayValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;%ExVariable&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(fxEval(%ExVariable))&lt;/EM&gt;&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;%SortingExpression&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[&lt;BR /&gt; %DisplayValue ,%ExVariable&lt;BR /&gt; Project Baseline ,vEqProjectBaseline&lt;BR /&gt; Estimate ,vEqEstimate&lt;BR /&gt; Baseline vs Estimate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,vEqBaselineVsEstimate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Set the sort expression in the pivot table:&lt;/P&gt;&lt;P&gt; &lt;IMG __jive_id="32759" alt="step4.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/32759_step4.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;5. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Create a selector for the sorting options (I used %DisplayValue in this example)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The Goods:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Adds sorting to pivot tables&lt;/P&gt;&lt;P&gt;Doesn’t seem to affect performance (not yet tested on large datasets)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The Bads:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This will probably be a bummer to maintain (– I’m thinking mismatching expressions between the table and the variables)&lt;/P&gt;&lt;P&gt;Takes a couple of hours to set up and test&lt;/P&gt;&lt;P&gt;You'll only be able to sort ASC [OR] DESC, not have the option of both&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;Rich &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 17:00:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sort-the-pivot-table/m-p/398916#M1162866</guid>
      <dc:creator />
      <dc:date>2013-01-29T17:00:13Z</dc:date>
    </item>
  </channel>
</rss>

