<?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: Sorting a calculated dimension in a bar chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201258#M386781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also read about some of what I explained here under the header '&lt;STRONG&gt;Nulls in Basic Maths&lt;/STRONG&gt;'&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.qlikviewaddict.com/2012/04/handling-nulls-in-qlikview.html" title="http://www.qlikviewaddict.com/2012/04/handling-nulls-in-qlikview.html"&gt;QlikView Addict: Handling Nulls in QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2016 21:38:03 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-04T21:38:03Z</dc:date>
    <item>
      <title>Sorting a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201252#M386775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having issue while sorting a calculated dimension in a bar chart. I am using calculated dimension which produce yearly data point as well as monthly data points(only for the last year).I need to sort the data field firstly by year and then by month. I have tried using match function in expression in sort tab but it's not working for me.&lt;/P&gt;&lt;P&gt;The following calculated dimension I am using :&lt;/P&gt;&lt;P&gt;=if(Year &amp;lt;&amp;gt; vMaxYear,Year,Month)&lt;/P&gt;&lt;P&gt;So, in case of last year it will show data monthly wise otherwise yearly.&lt;/P&gt;&lt;P&gt;Please refer to below graph for output. So, I need to have data like this 2009, 2010, jan , feb, mar, apr...... dec.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="139607" alt="ddd.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139607_ddd.PNG" style="height: 235px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 19:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201252#M386775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-04T19:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201253#M386776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try a sort expression like this with ascending sort:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeSum(Year, Num(Month)*10000)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 20:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201253#M386776</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-04T20:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201254#M386777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe sorting (Sort tab) only by this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=if(Year &amp;lt;&amp;gt; vMaxYear,Year,Month*10000)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 20:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201254#M386777</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-10-04T20:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201255#M386778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny for the quick reply. It worked like charm. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I just have a little doubt how we are using rangesum for sorting purpose here? Normally, we use it for rolled up sum, avg etc... if you could explain it a bit that would be much help for better understanding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 20:57:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201255#M386778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-04T20:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201256#M386779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Massimo for immediate respone. your solution did work too but by multiplying the month with 10000 it is changing the data points values into 10000, 20000, 300000...... .&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 21:01:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201256#M386779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-04T21:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201257#M386780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only reason I used RangeSum is because there might be nulls which I thought might create problems. I could have just given you this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year + Num(Month) * 10000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But if either Year or Num(Month) * 10000 are null, the whole row will turn into null. Whereas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RangeSum(Year, Num(Month)*10000)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;will take care of nulls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, RangeSum is not just used for rolled up sum (not sure what that means), but it is also used to Sum two expressions where one can be null at times. Other longer alternatives can be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Alt(Year, 0) + Alt(&lt;/STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Num(Month) * 10000, 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim(Year)) = 0, 0, Year) + If(Len(Trim(Num(Month))) = 0, 0, &lt;/STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Num(Month) * 10000)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of these are safety nets and not necessarily needed. But why not use a simple RangeSum instead of + if it is more robust, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 21:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201257#M386780</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-04T21:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a calculated dimension in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201258#M386781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also read about some of what I explained here under the header '&lt;STRONG&gt;Nulls in Basic Maths&lt;/STRONG&gt;'&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.qlikviewaddict.com/2012/04/handling-nulls-in-qlikview.html" title="http://www.qlikviewaddict.com/2012/04/handling-nulls-in-qlikview.html"&gt;QlikView Addict: Handling Nulls in QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 21:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-a-calculated-dimension-in-a-bar-chart/m-p/1201258#M386781</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-04T21:38:03Z</dc:date>
    </item>
  </channel>
</rss>

