<?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: Custom Sort on Straight Table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969333#M79980</link>
    <description>&lt;P&gt;Thanks for the help, Rockstar.&amp;nbsp; I created a calculated Dimension for both PICK(MATCH([Trend Month],’Jan’,’Feb’,…),1,2,…) and PICK(MATCH([Trend Year],’2020’,’2021’,…),1,2,…)&lt;/P&gt;
&lt;P&gt;Then I sorted by those dimensions Num Value Only.&amp;nbsp; This solved the dimensions out of order problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To fix the fields disappearing when no data, I added an expression that always has data when no selection is made and used set analysis to ignore the selections =Count({1&amp;lt;[Field]…&amp;nbsp; and then hid all he columns I don’t want to display using the Hide Column radio button on the Presentation tab&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 18:53:38 GMT</pubDate>
    <dc:creator>scottc00</dc:creator>
    <dc:date>2022-08-16T18:53:38Z</dc:date>
    <item>
      <title>Custom Sort on Straight Table</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969206#M79956</link>
      <description>&lt;P&gt;I am having problems with a custom sort&lt;/P&gt;
&lt;P&gt;I am using a straight table with 2 Dimensions.&amp;nbsp; [Trend Year] and [Trend Month]&lt;/P&gt;
&lt;P&gt;I am trying to show the last 12 months of data (in order).&lt;/P&gt;
&lt;P&gt;To do this I have the dimensions set up with these expressions&lt;/P&gt;
&lt;P&gt;=IF(Match([Trend Year],'2020','2021','2022','2023','2024','2025'),[Trend Year])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;=IF(MATCH([Trend Month],'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),[Trend Month])&lt;/P&gt;
&lt;P&gt;I use these expressions in the sort order&lt;/P&gt;
&lt;P&gt;MATCH([Trend Year],'2020', '2021','2022','2023','2024','2025')&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MATCH([Trend Month],'Jan', 'Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')&lt;/P&gt;
&lt;P&gt;The Sort by for every Expression has nothing checked.&lt;/P&gt;
&lt;P&gt;My straight table looks fine as long as I don’t make any selections in the dashboard.&amp;nbsp; Meaning, As long as every dimension has data.&amp;nbsp; As soon as the filters cause blank columns it’s chaos.&amp;nbsp; Columns started disappearing so I added a hidden column that ignores the selections.&amp;nbsp; Now the columns don’t disappear, but they are no longer in the specified order. To be clear, this sort order issue is only when selections are made.&amp;nbsp; For example, if I select John Doe and he didn’t start until Dec2021, then Aug2021 – Nov2021 are in a random order (because there is no data), Dec2021 – Jul2022 are in the correct order.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969206#M79956</guid>
      <dc:creator>scottc00</dc:creator>
      <dc:date>2022-08-16T13:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort on Straight Table</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969222#M79959</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/117276"&gt;@scottc00&lt;/a&gt;&amp;nbsp; try below one&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PICK(MATCH([Trend Year],'2020', '2021','2022','2023','2024','2025') ,1,2,3,4,5,6)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PICK(MATCH([Trend Month],'Jan', 'Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),1,2,3,4,5,6,7,8,9,10,11,12)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 14:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969222#M79959</guid>
      <dc:creator>Rockstar7</dc:creator>
      <dc:date>2022-08-16T14:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort on Straight Table</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969227#M79960</link>
      <description>&lt;P&gt;I think the one above can work, and will improve performance as it will get rid for IF statements which can really drag performance.&lt;/P&gt;
&lt;P&gt;Luiz&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 14:18:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969227#M79960</guid>
      <dc:creator>luizcdepaula</dc:creator>
      <dc:date>2022-08-16T14:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort on Straight Table</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969240#M79961</link>
      <description>&lt;P&gt;Thanks Rockstar and Luiz.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rockstar, It looks like your suggestion should be used in the Sort Expression.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But Luiz response suggests it should be used in the Dimension Expression.&lt;/P&gt;
&lt;P&gt;When I use it in the Sort Expression it doesn't seem to fix the issue.&lt;/P&gt;
&lt;P&gt;When I use it in the Dimension Expression it also doesn't seem to fix the issue, but it additionally changes all my years to 1,2,3,4,5,6 and my months to 1,2,3,4,5,6,7,8,9,10,11,12.&lt;/P&gt;
&lt;P&gt;I am obviously using&amp;nbsp; it incorrectly.&amp;nbsp; Can&amp;nbsp; you be a bit more specific on how to use your suggestion.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 14:31:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969240#M79961</guid>
      <dc:creator>scottc00</dc:creator>
      <dc:date>2022-08-16T14:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort on Straight Table</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969333#M79980</link>
      <description>&lt;P&gt;Thanks for the help, Rockstar.&amp;nbsp; I created a calculated Dimension for both PICK(MATCH([Trend Month],’Jan’,’Feb’,…),1,2,…) and PICK(MATCH([Trend Year],’2020’,’2021’,…),1,2,…)&lt;/P&gt;
&lt;P&gt;Then I sorted by those dimensions Num Value Only.&amp;nbsp; This solved the dimensions out of order problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To fix the fields disappearing when no data, I added an expression that always has data when no selection is made and used set analysis to ignore the selections =Count({1&amp;lt;[Field]…&amp;nbsp; and then hid all he columns I don’t want to display using the Hide Column radio button on the Presentation tab&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 18:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-on-Straight-Table/m-p/1969333#M79980</guid>
      <dc:creator>scottc00</dc:creator>
      <dc:date>2022-08-16T18:53:38Z</dc:date>
    </item>
  </channel>
</rss>

