<?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 Second Dimension Sort w/ Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774369#M537533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to sort a pivot table based on two dimensions, first Dim3 then by Dim2 in ascending order.&amp;nbsp; I don't understand why the expression is sorted incorrectly relative to the second dimension.&amp;nbsp; The sort is based on the expression, which includes &lt;EM&gt;set analysis&lt;/EM&gt;.&amp;nbsp; You'll see the Simple chart contains no set analysis and appears to sort correctly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice in the highlighted region on the Set Analysis chart how the order of the expression is {4.5,12.2,14.2,17.1,26.4,20.1}.&amp;nbsp; I expect to see {4.5,12.2,14.2,17.1,20.1,26.4}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="overview.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70561_overview.png" style="width: 620px; height: 500px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression in the Set Analysis chart is: Sum({$&amp;lt;Expression3={"&amp;lt;=.5"}&amp;gt;}Expression3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sort is based on the same expression for both dimensions:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Dim3 Sort.png" class="jive-image" src="/legacyfs/online/70575_Dim3 Sort.png" style="width: 620px; height: 405px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Dim2 Sort.png" class="jive-image" src="/legacyfs/online/70576_Dim2 Sort.png" style="width: 620px; height: 435px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does someone know why the pivot table is not sorting correctly?&amp;nbsp; Is there a way to correct this?&amp;nbsp; I appreciate any feedback!&amp;nbsp; I've attached the example qvw to this post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2014 16:05:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-05T16:05:03Z</dc:date>
    <item>
      <title>Second Dimension Sort w/ Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774369#M537533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to sort a pivot table based on two dimensions, first Dim3 then by Dim2 in ascending order.&amp;nbsp; I don't understand why the expression is sorted incorrectly relative to the second dimension.&amp;nbsp; The sort is based on the expression, which includes &lt;EM&gt;set analysis&lt;/EM&gt;.&amp;nbsp; You'll see the Simple chart contains no set analysis and appears to sort correctly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice in the highlighted region on the Set Analysis chart how the order of the expression is {4.5,12.2,14.2,17.1,26.4,20.1}.&amp;nbsp; I expect to see {4.5,12.2,14.2,17.1,20.1,26.4}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="overview.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70561_overview.png" style="width: 620px; height: 500px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression in the Set Analysis chart is: Sum({$&amp;lt;Expression3={"&amp;lt;=.5"}&amp;gt;}Expression3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sort is based on the same expression for both dimensions:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Dim3 Sort.png" class="jive-image" src="/legacyfs/online/70575_Dim3 Sort.png" style="width: 620px; height: 405px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Dim2 Sort.png" class="jive-image" src="/legacyfs/online/70576_Dim2 Sort.png" style="width: 620px; height: 435px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does someone know why the pivot table is not sorting correctly?&amp;nbsp; Is there a way to correct this?&amp;nbsp; I appreciate any feedback!&amp;nbsp; I've attached the example qvw to this post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 16:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774369#M537533</guid>
      <dc:creator />
      <dc:date>2014-11-05T16:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Second Dimension Sort w/ Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774370#M537534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a difference between Pivot Table and Straight Table Sorting...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Pivot Table, You need to sort by First Dimension and then 2nd Dimension....&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;you have to sort it first according to the first dimension, then according to the next, etc. You cannot sort it any way you want.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 16:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774370#M537534</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-05T16:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Second Dimension Sort w/ Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774371#M537535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp; I will mark your response as the correct answer because you found a fix to my sorting issue.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not fully understand your response.&amp;nbsp; In my original example I did sort by the first dimension and then the second dimension.&amp;nbsp; Both sorts used the same expression, but they had sorting applied in that order.&amp;nbsp; The difference you pointed out is the first dimension needs to sorted by the Y-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know what about the Y-value sort on the first dimension caused the sorting to correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 19:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774371#M537535</guid>
      <dc:creator />
      <dc:date>2014-11-05T19:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Second Dimension Sort w/ Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774372#M537536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provide me your required result in excel... I will check and come back to you soon. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 19:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-Dimension-Sort-w-Expression/m-p/774372#M537536</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-05T19:56:02Z</dc:date>
    </item>
  </channel>
</rss>

