<?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: Sorting in Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662024#M674744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Are you using the same expression to sort all three dimensions?&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Aug 2014 07:26:47 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2014-08-12T07:26:47Z</dc:date>
    <item>
      <title>Sorting in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662022#M674742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that when we sort using expression in Pivot Table, sometime the sorting is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In below example, I would like to sort the Year, Division and Category dimensions using Sum(LineSalesAmount).&amp;nbsp; When I expand the Division column, notice that the Sum(LineSalesAmount) for Year 2012 are not sorted properly, as shown below: &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/64212_Image1.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I expand the Division and Category columns, notice that the Sum(LineSalesAmount) are not sorted properly, as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image2.png" class="jive-image jiveImage" src="https://community.qlik.com/legacyfs/online/64213_Image2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my sorting tab:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="image3.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/64214_image3.png" style="width: 620px; height: 545px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any tips how to sort the Year, Division and Category dimensions using sum(LineSalesAmount) correctly?&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;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 07:25:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662022#M674742</guid>
      <dc:creator>Eric_Tay</dc:creator>
      <dc:date>2014-08-12T07:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662023#M674743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please share your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 07:26:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662023#M674743</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2014-08-12T07:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662024#M674744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Are you using the same expression to sort all three dimensions?&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 07:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662024#M674744</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2014-08-12T07:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662025#M674745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a complete answer, I can tell you this is done because QV assigns the order to the field CategoryName before he draws the pivot table, so segment dimensions (Year and Division) are not taking into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sportswear is the 2nd. in Europe because the value 'Sportswear' of the field CategoryName is the 2nd with more sales on current selections (not in the year-Division in pivot table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you define the 3rd dimension as &lt;EM&gt;=Aggr(Year &amp;amp; '-' &amp;amp; Division &amp;amp; '-' &amp;amp; CategoryName, Year, Division, CategoryName)&lt;/EM&gt; you can see then is sorted correctly, but this cause your selections in CategoryName not working as the user probably wants (not to mention the bad-looking for the CategoryName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In script you can use &lt;EM&gt;Dual(CategoryName, &lt;/EM&gt;AutoNumber(&lt;EM&gt;Year &amp;amp; '-' &amp;amp; Division &amp;amp; '-' &amp;amp; CategoryName)) as CategoryName &lt;/EM&gt;but weird things also can happen with selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you to find a solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 10:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662025#M674745</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-08-12T10:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662026#M674746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I am using the same expression to sort all three dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 10:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662026#M674746</guid>
      <dc:creator>Eric_Tay</dc:creator>
      <dc:date>2014-08-13T10:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sorting in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662027#M674747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is the file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 10:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662027#M674747</guid>
      <dc:creator>Eric_Tay</dc:creator>
      <dc:date>2014-08-13T10:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sorting in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662028#M674748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try it and I will let you know whether it works or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 10:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Pivot-Table/m-p/662028#M674748</guid>
      <dc:creator>Eric_Tay</dc:creator>
      <dc:date>2014-08-13T10:21:18Z</dc:date>
    </item>
  </channel>
</rss>

