<?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: Bar Chart Sorting Issue in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Sorting-Issue/m-p/1513522#M40166</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It would be better if you can make this binning in script side. But if you have to do that in front-end you can use dual function to&amp;nbsp;&lt;SPAN&gt;combine a number and a string into a single record and you can use this number representation for sorting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=IF(Aggr(Sum(Revenue),Client)&amp;lt;5,&lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'&amp;lt;5M',1&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=5 and Aggr(Sum(Revenue),Client)&amp;lt;10, &lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'5M-10M',2&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=10 and Aggr(Sum(Revenue),Client)&amp;lt;15, &lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'10M-15M',3&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=15 and Aggr(Sum(Revenue),Client)&amp;lt;20, &lt;FONT color="#FF0000"&gt;dual('&lt;/FONT&gt;15M-20M',4&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;IF(Aggr(Sum(Revenue),Client)&amp;gt;20 or isnull(Aggr(Sum(Revenue),Client)),&lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'&amp;gt;20M',5&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;)))))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 555px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1190iA6DE0DE4C2364AD6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope it helps..&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2018 10:35:20 GMT</pubDate>
    <dc:creator>kaanerisen</dc:creator>
    <dc:date>2018-11-28T10:35:20Z</dc:date>
    <item>
      <title>Bar Chart Sorting Issue</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Sorting-Issue/m-p/1513455#M40165</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have an issue with sorting in the bar chart.&amp;nbsp; I have a data,&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Client, Revenue&lt;BR /&gt;A, 6&lt;BR /&gt;B, 2&lt;BR /&gt;C, 1&lt;BR /&gt;D, 3&lt;BR /&gt;E, 7&lt;BR /&gt;F, 9&lt;BR /&gt;G, 9&lt;BR /&gt;H, 9&lt;BR /&gt;I, 9&lt;BR /&gt;J, 12&lt;BR /&gt;K, 11&lt;BR /&gt;L, 17&lt;BR /&gt;M, 19&lt;BR /&gt;N, 23&lt;BR /&gt;O, 44&lt;BR /&gt;P, 33&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I have a calculated Dimension which has revenue ranges.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Dimension:&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;IF(Aggr(Sum(Revenue),Client)&amp;lt;5,'&amp;lt;5M',&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=5 and Aggr(Sum(Revenue),Client)&amp;lt;10, '5M-10M',&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=10 and Aggr(Sum(Revenue),Client)&amp;lt;15, '10M-15M',&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=15 and Aggr(Sum(Revenue),Client)&amp;lt;20, '15M-20M',&lt;BR /&gt;IF(Aggr(Sum(Revenue),Client)&amp;gt;20 or isnull(Aggr(Sum(Revenue),Client)),'&amp;gt;20M',&lt;BR /&gt;)))))&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Expression:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Sum(Revenue)&lt;/P&gt;&lt;P&gt;I need the dimension to sort in the order&amp;nbsp; &amp;nbsp;'&amp;lt;5M', '5M-10M', '10M-15M',' 15M-20M', '&amp;gt;20M'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sorting expression:&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;pick(match(IF(Aggr(Sum(Revenue),Client)&amp;lt;5,'&amp;lt;5M',&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=5 and Aggr(Sum(Revenue),Client)&amp;lt;10, '5M-10M',&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=10 and Aggr(Sum(Revenue),Client)&amp;lt;15, '10M-15M',&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=15 and Aggr(Sum(Revenue),Client)&amp;lt;20, '15M-20M',&lt;BR /&gt;IF(Aggr(Sum(Revenue),Client)&amp;gt;20 or isnull(Aggr(Sum(Revenue),Client)),'&amp;gt;20M',&lt;BR /&gt;))))),'&amp;lt;5M','5M-10M','10M-15M','15M-20M','&amp;gt;20M'),1,2,3,4,5)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But It did not work. Please help me on this.&lt;/P&gt;&lt;P&gt;Attached the sample application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 09:30:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Sorting-Issue/m-p/1513455#M40165</guid>
      <dc:creator>avinashkk696</dc:creator>
      <dc:date>2018-11-28T09:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart Sorting Issue</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Sorting-Issue/m-p/1513522#M40166</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It would be better if you can make this binning in script side. But if you have to do that in front-end you can use dual function to&amp;nbsp;&lt;SPAN&gt;combine a number and a string into a single record and you can use this number representation for sorting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=IF(Aggr(Sum(Revenue),Client)&amp;lt;5,&lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'&amp;lt;5M',1&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=5 and Aggr(Sum(Revenue),Client)&amp;lt;10, &lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'5M-10M',2&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=10 and Aggr(Sum(Revenue),Client)&amp;lt;15, &lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'10M-15M',3&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;if(Aggr(Sum(Revenue),Client)&amp;gt;=15 and Aggr(Sum(Revenue),Client)&amp;lt;20, &lt;FONT color="#FF0000"&gt;dual('&lt;/FONT&gt;15M-20M',4&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;IF(Aggr(Sum(Revenue),Client)&amp;gt;20 or isnull(Aggr(Sum(Revenue),Client)),&lt;FONT color="#FF0000"&gt;dual(&lt;/FONT&gt;'&amp;gt;20M',5&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,&lt;BR /&gt;)))))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 555px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1190iA6DE0DE4C2364AD6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope it helps..&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 10:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Sorting-Issue/m-p/1513522#M40166</guid>
      <dc:creator>kaanerisen</dc:creator>
      <dc:date>2018-11-28T10:35:20Z</dc:date>
    </item>
  </channel>
</rss>

