<?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 Order Not Working - Bar Chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476446#M100279</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/209636"&gt;@shansen&lt;/a&gt;&amp;nbsp; try this expression&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Match(&lt;STRONG&gt;&lt;EM&gt;only({1}[combined_report.STAGES])&lt;/EM&gt;&lt;/STRONG&gt;,'SQL','SQO','Closed Won')&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2024 09:31:08 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2024-08-15T09:31:08Z</dc:date>
    <item>
      <title>Custom Sort Order Not Working - Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476341#M100267</link>
      <description>&lt;P&gt;I have categories in my bar chart based on the [combined_report.STAGES] field.&amp;nbsp; I want the stage output to always appear in a specified order, so I go to&amp;nbsp;Sorting &amp;gt; Custom &amp;gt; Sort by expression &amp;gt; Ascending &amp;gt; Expression = Match([combined_report.STAGES],'SQL','SQO','Closed Won').&amp;nbsp; However, this is not making the order appear as SQL, SQO, Closed Won.&amp;nbsp; (See Stages out of order.png attachment.)&amp;nbsp; I even made the categories be based on the same formula&amp;nbsp;= Match([combined_report.STAGES],'SQL','SQO','Closed Won'), and then just did straight-up numeric sorting.&amp;nbsp; Even then the numbers appear out of order. (See Numbers out of order.png.)&amp;nbsp; I am not sorting by the Actual or Forecast values at all.&amp;nbsp; (See Sort order selections.png.)&lt;/P&gt;
&lt;P&gt;Is the custom sort order functionality broken, or am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 15:44:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476341#M100267</guid>
      <dc:creator>shansen</dc:creator>
      <dc:date>2024-08-14T15:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Order Not Working - Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476347#M100268</link>
      <description>&lt;P&gt;This is very strange, I was able to do it four different ways.&lt;/P&gt;
&lt;P&gt;The one I would recommend is using the Dual() function to force a numeric sort order on the field in the data model load script.&lt;/P&gt;
&lt;P&gt;The other approaches are variations based on what you did and then the load order of the field. I think the screen shots have enough info to help figure it out.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;//use this in the load of the STAGES Field
//the match function returns zero when no match is found so
//that would mess things up.
Load
Dual(STAGES,Match(STAGES,'SQL','SQO','Closed Won')) as STAGES
From...;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 17:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476347#M100268</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2024-08-14T17:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Order Not Working - Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476391#M100273</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;
&lt;P&gt;I really appreciate the response.&amp;nbsp; I tried what you suggested (Dual(STAGES,Match(STAGES,'SQL','SQO','Closed Won')) as STAGES in the load statement), and it didn't change the behavior.&amp;nbsp; It still jumps around when I make different selections.&amp;nbsp; I think I am just going to have to sort on something else.&lt;/P&gt;
&lt;P&gt;I have a theory that the set statements on the Actual and Forecast values in the bar chart, which remove one of the STAGES values, must be confusing the sort order somehow.&amp;nbsp; Perhaps it is related to values being marked as zero in the Match statement even though they don't appear on the chart.&amp;nbsp; Maybe if it comes up again sometime I will take the time to sanitize the data and give an example App that reproduces the problem.&amp;nbsp; For now, I think I need to move on.&lt;BR /&gt;&lt;BR /&gt;Anyway, thanks for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 23:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476391#M100273</guid>
      <dc:creator>shansen</dc:creator>
      <dc:date>2024-08-14T23:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Order Not Working - Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476446#M100279</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/209636"&gt;@shansen&lt;/a&gt;&amp;nbsp; try this expression&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Match(&lt;STRONG&gt;&lt;EM&gt;only({1}[combined_report.STAGES])&lt;/EM&gt;&lt;/STRONG&gt;,'SQL','SQO','Closed Won')&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 09:31:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476446#M100279</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-08-15T09:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Order Not Working - Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476873#M100317</link>
      <description>&lt;P&gt;Kushal,&amp;nbsp; Thanks for the response.&amp;nbsp; I cannot use the {1}, as my App needs to respond to selections on the sheet.&amp;nbsp; I did try the only() function, though,&amp;nbsp; The chart still responded the same - The SQL, SQO and Closed Won columns flop around depending on other selections made.&amp;nbsp; It's a mystery to me.&amp;nbsp; Good try, though!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 15:29:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-Sort-Order-Not-Working-Bar-Chart/m-p/2476873#M100317</guid>
      <dc:creator>shansen</dc:creator>
      <dc:date>2024-08-19T15:29:06Z</dc:date>
    </item>
  </channel>
</rss>

