<?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 Sort a filter pane with my custom order in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1886953#M199229</link>
    <description>&lt;P&gt;Hi, I am trying to sort a filter pane according to the order I want. So I found order by expression but I am not understanding how to use that. In specific the column has values like JUL21, JAN21, etc. I want to sort it by month. Like JAN21, FEB21, etc.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 08:55:59 GMT</pubDate>
    <dc:creator>manmade</dc:creator>
    <dc:date>2022-01-31T08:55:59Z</dc:date>
    <item>
      <title>Sort a filter pane with my custom order</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1886953#M199229</link>
      <description>&lt;P&gt;Hi, I am trying to sort a filter pane according to the order I want. So I found order by expression but I am not understanding how to use that. In specific the column has values like JUL21, JAN21, etc. I want to sort it by month. Like JAN21, FEB21, etc.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 08:55:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1886953#M199229</guid>
      <dc:creator>manmade</dc:creator>
      <dc:date>2022-01-31T08:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a filter pane with my custom order</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1886989#M199237</link>
      <description>&lt;P&gt;you can try below function in custom sort order&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Match(field, 'Jan2021', 'Feb2021',.....)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 10:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1886989#M199237</guid>
      <dc:creator>anat</dc:creator>
      <dc:date>2022-01-31T10:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a filter pane with my custom order</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1886992#M199238</link>
      <description>&lt;P&gt;Values&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt; 'FEB21', 'JUN21' &lt;/STRONG&gt;&lt;/SPAN&gt;etc. are interpreted as &lt;STRONG&gt;strings &lt;/STRONG&gt;and thus they can only be sorted &lt;STRONG&gt;alphabetically&lt;/STRONG&gt;. You will have to change the sorting method to &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;"Sort by expression"&lt;/STRONG&gt;&lt;/SPAN&gt; and then use a combination of&amp;nbsp;&amp;nbsp;various functions to construct a date from the given values. After that the values will be sorted based on the constructed date format. In your case, you should do the following:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. Go to &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;Edit sheet&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;2. Edit the &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Filter pane&lt;/STRONG&gt;&lt;/SPAN&gt; visualization&lt;/P&gt;

&lt;P&gt;3. Go to Sorting and Un-check &lt;STRONG&gt;"Custom"&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;4. Choose&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt; "Sort by expression"&lt;/STRONG&gt;&lt;/SPAN&gt; and use the following expression:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;MakeDate&lt;/SPAN&gt;(&lt;SPAN style="color:#27ae60"&gt;'20'&lt;/SPAN&gt;&amp;amp;&lt;SPAN style="color:#2980b9"&gt;Right&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Dates&lt;/SPAN&gt;, 2), &lt;SPAN style="color:#2980b9"&gt;Match&lt;/SPAN&gt;(&lt;SPAN style="color:#2980b9"&gt;Left&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Dates&lt;/SPAN&gt;, 3),&lt;SPAN style="color:#27ae60"&gt; 'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','FEB','OCT','NOV','DEC'&lt;/SPAN&gt;), 1)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Allow me to breakdown the parts of the expression for better understanding:&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;&lt;STRONG&gt;&lt;SPAN style="color:#27ae60"&gt;'20'&lt;/SPAN&gt;&amp;amp;&lt;SPAN style="color:#2980b9"&gt;Right&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Dates&lt;/SPAN&gt;, 2)&lt;/STRONG&gt; will concatenate &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"20"&lt;/STRONG&gt;&lt;/SPAN&gt; with the last &lt;STRONG&gt;2&lt;/STRONG&gt; characters of each date. So either &lt;STRONG&gt;21 &lt;/STRONG&gt;or &lt;STRONG&gt;22 &lt;/STRONG&gt;etc. The result will be &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;2021 &lt;/STRONG&gt;&lt;/SPAN&gt;or &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;2022 &lt;/STRONG&gt;&lt;/SPAN&gt;etc.&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;Match&lt;/SPAN&gt;(&lt;SPAN style="color:#2980b9"&gt;Left&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Dates&lt;/SPAN&gt;, 3),&lt;SPAN style="color:#27ae60"&gt; 'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','FEB','OCT','NOV','DEC'&lt;/SPAN&gt;),&lt;/STRONG&gt; will give you the number of the month. You are getting the values &lt;STRONG&gt;JAN&lt;/STRONG&gt;, &lt;STRONG&gt;FEB &lt;/STRONG&gt;etc. using the &lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;Left&lt;/SPAN&gt;() &lt;/STRONG&gt;function and then you check the index. So for example &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;JAN &lt;/STRONG&gt;&lt;/SPAN&gt;will give you number &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;FEB &lt;/STRONG&gt;&lt;/SPAN&gt;number &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; etc.&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;MakeDate&lt;/SPAN&gt;()&lt;/STRONG&gt; will build dates like &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;1/1/2021, 2/1/2022&lt;/STRONG&gt;&lt;/SPAN&gt; etc. which will allow proper sorting of the values&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Output is:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;BEFORE:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/becb2a73-50c7-4e94-84aa-28ee2640ce21.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;AFTER:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="IMAGE" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/31551ace-df08-4baa-95fc-a667451ded3f.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;As you can see now they are sorted properly!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;EM&gt;&lt;STRONG&gt;I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 10:22:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1886992#M199238</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2022-01-31T10:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a filter pane with my custom order</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1887034#M199240</link>
      <description>&lt;P&gt;Thanks a lot, it is working!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 11:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Sort-a-filter-pane-with-my-custom-order/m-p/1887034#M199240</guid>
      <dc:creator>manmade</dc:creator>
      <dc:date>2022-01-31T11:36:17Z</dc:date>
    </item>
  </channel>
</rss>

