<?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 calculated dimension in a bar chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394321#M147043</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help if possible. I have created a bar chart that uses a calculated dimension for the X-axis. The calculated dimension is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Gross Sales]&amp;lt;10000000 ,'&amp;lt;$10MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=10000000 and [Gross Sales]&amp;lt;25000000),'$10MM-$25MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=25000000 and [Gross Sales]&amp;lt;50000000),'$25MM-$50MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=50000000 and [Gross Sales]&amp;lt;75000000),'$50MM-$75MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=75000000),'&amp;gt;$75MM','None')))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Y-axis shows the number of products, so the bar chart shows correct values. It shows the number of products for each Gross Sales range. The problem is that I am not able to sort the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the X-axis to show in this order (ascending):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'&amp;lt;$10MM','$10MM-$25MM','$25MM-$50MM','$50MM-$75MM','&amp;gt;$75MM'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting a different order, see the attached screenshot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;match(&lt;/P&gt;&lt;P&gt;if([Gross Sales]&amp;lt;10000000 ,'&amp;lt;$10MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=10000000 and [Gross Sales]&amp;lt;25000000),'$10MM-$25MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=25000000 and [Gross Sales]&amp;lt;50000000),'$25MM-$50MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=50000000 and [Gross Sales]&amp;lt;75000000),'$50MM-$75MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=75000000),'&amp;gt;$75MM','None'))))), '&amp;lt;$10MM','$10MM-$25MM','$25MM-$50MM','$50MM-$75MM','&amp;gt;$75MM')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But doesn't work. Any help will be very appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 15:59:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-28T15:59:00Z</dc:date>
    <item>
      <title>Sort a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394321#M147043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help if possible. I have created a bar chart that uses a calculated dimension for the X-axis. The calculated dimension is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Gross Sales]&amp;lt;10000000 ,'&amp;lt;$10MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=10000000 and [Gross Sales]&amp;lt;25000000),'$10MM-$25MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=25000000 and [Gross Sales]&amp;lt;50000000),'$25MM-$50MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=50000000 and [Gross Sales]&amp;lt;75000000),'$50MM-$75MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=75000000),'&amp;gt;$75MM','None')))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Y-axis shows the number of products, so the bar chart shows correct values. It shows the number of products for each Gross Sales range. The problem is that I am not able to sort the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the X-axis to show in this order (ascending):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'&amp;lt;$10MM','$10MM-$25MM','$25MM-$50MM','$50MM-$75MM','&amp;gt;$75MM'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting a different order, see the attached screenshot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;match(&lt;/P&gt;&lt;P&gt;if([Gross Sales]&amp;lt;10000000 ,'&amp;lt;$10MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=10000000 and [Gross Sales]&amp;lt;25000000),'$10MM-$25MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=25000000 and [Gross Sales]&amp;lt;50000000),'$25MM-$50MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=50000000 and [Gross Sales]&amp;lt;75000000),'$50MM-$75MM',&lt;/P&gt;&lt;P&gt;if(([Gross Sales]&amp;gt;=75000000),'&amp;gt;$75MM','None'))))), '&amp;lt;$10MM','$10MM-$25MM','$25MM-$50MM','$50MM-$75MM','&amp;gt;$75MM')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But doesn't work. Any help will be very appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 15:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394321#M147043</guid>
      <dc:creator />
      <dc:date>2013-02-28T15:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394322#M147044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried putting your expression as a variable, say vSalesCat?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then you could do match($(vSalesCat),&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;'&amp;lt;$10MM','$10MM-$25MM','$25MM-$50MM','$50MM-$75MM','&amp;gt;$75MM'&lt;/SPAN&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394322#M147044</guid>
      <dc:creator />
      <dc:date>2013-02-28T16:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394323#M147045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried your suggestion and still doesn't work. The bars change of position when I change from ascending to descending but still not in the order wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:16:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394323#M147045</guid>
      <dc:creator />
      <dc:date>2013-02-28T16:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394324#M147046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm. Is Gross Sales a calculated field? If you replace it with sum(ALL sales) or whatever the calculation is in the variable, that could possibly help... unfortunately, I don't know for sure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:25:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394324#M147046</guid>
      <dc:creator />
      <dc:date>2013-02-28T16:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394325#M147047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to the sort tab in your chart and highlight the calculated dimension and promote it to the top of the list. Select sort by 'Expression'.&amp;nbsp; Select 'Ascending' from the drop down and then type [Gross Sales] in the expression box.&amp;nbsp; Hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-ART&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394325#M147047</guid>
      <dc:creator />
      <dc:date>2013-02-28T16:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sort a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394326#M147048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This fixed it. Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:45:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-a-calculated-dimension-in-a-bar-chart/m-p/394326#M147048</guid>
      <dc:creator />
      <dc:date>2013-02-28T18:45:34Z</dc:date>
    </item>
  </channel>
</rss>

