<?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: Formatting Quarter and Year - sorting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562412#M209910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What would be the correct way, to format the field as appropriately formated date, if my input is YearCalendarWeek, e.g. "201715"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Apr 2017 13:50:14 GMT</pubDate>
    <dc:creator>chriys1337</dc:creator>
    <dc:date>2017-04-10T13:50:14Z</dc:date>
    <item>
      <title>Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562405#M209903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm receive the following from the source instead of a date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q1 2012&amp;nbsp; &lt;/P&gt;&lt;P&gt;Q2 2012&amp;nbsp; &lt;/P&gt;&lt;P&gt;Q3 2012&lt;/P&gt;&lt;P&gt;Q4 2012&lt;/P&gt;&lt;P&gt;Q1 2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty sure this is the load order too. But when I try to sort in the pivot object I'm seeing a different order.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to show sales by product for last 5 quarters in a line chart.&amp;nbsp; Product is the other dimension used. &lt;/P&gt;&lt;P&gt;Any help is appreciated... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 20:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562405#M209903</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-10T20:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562406#M209904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Reverse the order of Year and Q:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Right(YQ, 4) &amp;amp; ' ' &amp;amp; Left(YQ, 2) As YQ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will now be in dictionary order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; If you really need to keep the old formatting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Dual(YQ, Right(YQ, 4) &amp;amp; Mid(YQ, 2, 1)) As YQ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have the same format but you can sort them numerically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Stephen Redmond is author of &lt;/SPAN&gt;&lt;A href="http://www.packtpub.com/qlikview-developers-cookbook/book?utm_source=mention.com&amp;amp;utm_medium=QVCommunity&amp;amp;utm_campaign=book_mention"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;QlikView for Developer's Cookbook&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;He is CTO of &lt;A href="http://www.capventis.com/"&gt;CapricornVentis&lt;/A&gt; a &lt;/SPAN&gt;&lt;A href="http://www.qlik.com/us/explore/experience/free-download?id=/&amp;amp;sourcepartner=CapricornVentis"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;QlikView&lt;/SPAN&gt;&lt;/A&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Elite Partner. We are always looking for the right people to &lt;/SPAN&gt;&lt;A href="http://capventis.com/category/careers/"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;join our team&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Follow me on Twitter: &lt;/SPAN&gt;&lt;A href="http://twitter.com/stephencredmond"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;@stephencredmond&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 21:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562406#M209904</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2013-07-10T21:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562407#M209905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stephen. The second option is working fine for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 16:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562407#M209905</guid>
      <dc:creator />
      <dc:date>2014-06-09T16:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562408#M209906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A very good approach and can also be used in the chart properties to Sort the values (under Sort tab-&amp;gt;Expression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 20:49:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562408#M209906</guid>
      <dc:creator>montubhardwaj</dc:creator>
      <dc:date>2016-10-27T20:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562409#M209907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I prefer all my date-like fields be appropriately-formatted dates. Then you can use all the normal date functions if you need them. In the case of quarters, I like to assign the first day of the quarter. I think like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;dual(YQ,makedate(right(YQ,4),mid(YQ,2,1)*3-2)) as YQ&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Edit: fixed&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 21:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562409#M209907</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-27T21:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562410#M209908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quite an old thread to continue, but I think your suggestion to create proper dates is the best &lt;SPAN style="font-size: 13.3333px;"&gt;solution here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I like your expression to create a dual quarter name field out of the given strings, I only guess the quarter number additionally has to be transformed into a month number e.g. using "QuarterNum*3-2" for the makedate() function to work properly in this case.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 23:58:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562410#M209908</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-10-27T23:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562411#M209909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops, didn't realize the thread had been necro'd!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And oops, I had the *3-2 on my computer, but failed to copy it when posting. I'll fix it just in case someone references it later.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 00:21:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562411#M209909</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-28T00:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562412#M209910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What would be the correct way, to format the field as appropriately formated date, if my input is YearCalendarWeek, e.g. "201715"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562412#M209910</guid>
      <dc:creator>chriys1337</dc:creator>
      <dc:date>2017-04-10T13:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Quarter and Year - sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562413#M209911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please open a new thread for this question. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 10:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Quarter-and-Year-sorting/m-p/562413#M209911</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2017-04-11T10:25:39Z</dc:date>
    </item>
  </channel>
</rss>

