<?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: Sort pie chart legend on calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-pie-chart-legend-on-calculated-dimension/m-p/396130#M562726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Celambarasan! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had already tried the first method and it did not work. I cut and pasted your reply to make sure it wasn't a typo, but that also did not work. However using Dual did the trick. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!! &lt;/P&gt;&lt;P&gt;Leilani &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 23:46:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-28T23:46:12Z</dc:date>
    <item>
      <title>Sort pie chart legend on calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-pie-chart-legend-on-calculated-dimension/m-p/396128#M562724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a calculated dimension to put records into one of four groups: &lt;/P&gt;&lt;P&gt;=if(PolYears &amp;gt;=1 and PolYears &amp;lt;=4, 'Insured Less Than 5 Years',&lt;/P&gt;&lt;P&gt;if(PolYears &amp;gt;=5 and PolYears &amp;lt;=9, 'Insured 5-9 Years',&lt;/P&gt;&lt;P&gt;if(PolYears &amp;gt;=10 and PolYears &amp;lt;=14, 'Insured 10-15 Years','Insured 15+ Years')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Is there a way to sort the legend based on the value of the calculated dimension?&lt;/P&gt;&lt;P&gt;Insured Less than 5 Years&lt;/P&gt;&lt;P&gt;Insured 5-9 Years&lt;/P&gt;&lt;P&gt;Insured 10-15 Years&lt;/P&gt;&lt;P&gt;Insured &amp;gt;15 Years&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Leilani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 23:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-pie-chart-legend-on-calculated-dimension/m-p/396128#M562724</guid>
      <dc:creator />
      <dc:date>2013-02-28T23:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sort pie chart legend on calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-pie-chart-legend-on-calculated-dimension/m-p/396129#M562725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the sort by expression option in the sort tab&lt;/P&gt;&lt;P&gt;Expression as&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=if(PolYears &amp;gt;=1 and PolYears &amp;lt;=4, 1,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(PolYears &amp;gt;=5 and PolYears &amp;lt;=9, 2,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(PolYears &amp;gt;=10 and PolYears &amp;lt;=14, 3,4)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Edit:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Another way is using Dual&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Change your calculated dimension to&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=if(PolYears &amp;gt;=1 and PolYears &amp;lt;=4, Dual('Insured Less Than 5 Years', 1),&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(PolYears &amp;gt;=5 and PolYears &amp;lt;=9, Dual('Insured 5-9 Years', 2),&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(PolYears &amp;gt;=10 and PolYears &amp;lt;=14, Dual('Insured 10-15 Years', 3),Dual('Insured 15+ Years', 4))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Sort by number as Ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Hope it helps&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 23:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-pie-chart-legend-on-calculated-dimension/m-p/396129#M562725</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-02-28T23:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sort pie chart legend on calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-pie-chart-legend-on-calculated-dimension/m-p/396130#M562726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Celambarasan! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had already tried the first method and it did not work. I cut and pasted your reply to make sure it wasn't a typo, but that also did not work. However using Dual did the trick. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!! &lt;/P&gt;&lt;P&gt;Leilani &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 23:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-pie-chart-legend-on-calculated-dimension/m-p/396130#M562726</guid>
      <dc:creator />
      <dc:date>2013-02-28T23:46:12Z</dc:date>
    </item>
  </channel>
</rss>

