<?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 Pivot Table - Sort with expression - Dimension Value in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pivot-Table-Sort-with-expression-Dimension-Value/m-p/1807083#M65675</link>
    <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;I am using the Pivot Table Visualization.&lt;/P&gt;&lt;P&gt;I am using a column dimension&amp;nbsp; - "Category Name".&lt;/P&gt;&lt;P&gt;I would like to sort the column dimension in a specific order.&lt;/P&gt;&lt;P&gt;I created a sorting - by expression using the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pick([invcatid],'ma','cg','sg','hs')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(the 'ma','cg','sg','ms' is the only inventory categories valid).&lt;/P&gt;&lt;P&gt;It does not sort accordingly - any thoughts ? Thanks - Jerry&lt;/P&gt;</description>
    <pubDate>Tue, 11 May 2021 18:56:03 GMT</pubDate>
    <dc:creator>jerryr125</dc:creator>
    <dc:date>2021-05-11T18:56:03Z</dc:date>
    <item>
      <title>Pivot Table - Sort with expression - Dimension Value</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-Sort-with-expression-Dimension-Value/m-p/1807083#M65675</link>
      <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;I am using the Pivot Table Visualization.&lt;/P&gt;&lt;P&gt;I am using a column dimension&amp;nbsp; - "Category Name".&lt;/P&gt;&lt;P&gt;I would like to sort the column dimension in a specific order.&lt;/P&gt;&lt;P&gt;I created a sorting - by expression using the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pick([invcatid],'ma','cg','sg','hs')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(the 'ma','cg','sg','ms' is the only inventory categories valid).&lt;/P&gt;&lt;P&gt;It does not sort accordingly - any thoughts ? Thanks - Jerry&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 18:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-Sort-with-expression-Dimension-Value/m-p/1807083#M65675</guid>
      <dc:creator>jerryr125</dc:creator>
      <dc:date>2021-05-11T18:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table - Sort with expression - Dimension Value</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-Sort-with-expression-Dimension-Value/m-p/1807103#M65676</link>
      <description>&lt;P&gt;Hello Jerry,&lt;/P&gt;&lt;P&gt;You can modify the default order of values on this field directly in the script editor :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;Create an inline table which contains the values in the order intended&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;// Values with desired order 
TMP:
LOAD * INLINE [
invcatid
ma
cg
sg
hs];

// Here, we've your final table which contains concerned dimensions
MyTable:
LOAD
invcatid,
*
RESIDENT TAB;

// Drop table
DROP TABLE TMP;​&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;After that, the field &lt;STRONG&gt;invcatid &lt;/STRONG&gt;take the 'good' order. Now, you can use this field in sort part (by expression).&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Tell us if it works.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 20:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-Sort-with-expression-Dimension-Value/m-p/1807103#M65676</guid>
      <dc:creator>Seyko</dc:creator>
      <dc:date>2021-05-11T20:03:50Z</dc:date>
    </item>
  </channel>
</rss>

