<?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 Chart will not always sort by fiscal month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402311#M566321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;This is my first post to QlikCommunity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;My chart should show the number of hours for each month in a fiscal year.&amp;nbsp; And the chart should show the months in fiscal year month order.&amp;nbsp; October = 1, November = 2, through September = 12.&amp;nbsp; The part that doesn't work is the chart does not always show the months in the correct order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The chart has one expression to reset the selection from a selected month to a fiscal year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13545658040122198" jivemacro_uid="_13545658040122198"&gt;&lt;P&gt;sum({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; calendar.fiscal_year = {"$(=max(calendar.fiscal_year))"},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; calendar.yearmonth=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;}hc.annual_leave_hours) &lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sort tab in the chart uses a fiscal month number to sort.&amp;nbsp; October = 1, November = 2, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13545655399506989" jivemacro_uid="_13545655399506989"&gt;&lt;P&gt;calendar.fiscal_month_sort&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If no selection is made, the months are shown in fiscal month order&lt;/P&gt;&lt;P&gt;If a month is selected, the months are not shown in fiscal month order.&amp;nbsp; And the order of the months varies depending on the month selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I force the months to always appear in fiscal month order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached qvw shows what happens.&amp;nbsp; It has two sheets.&amp;nbsp; The sheets show the same issue, but they have different data models.&amp;nbsp; I simplified the data model in sheet - Model 2, to try to isolate the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The excel is the data behind the QVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The examples in the QVW are just a starting point.&amp;nbsp; Additional expressions, data sets and selection criteria will be added once this issue is figured out;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Dec 2012 20:44:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-03T20:44:29Z</dc:date>
    <item>
      <title>Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402311#M566321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;This is my first post to QlikCommunity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;My chart should show the number of hours for each month in a fiscal year.&amp;nbsp; And the chart should show the months in fiscal year month order.&amp;nbsp; October = 1, November = 2, through September = 12.&amp;nbsp; The part that doesn't work is the chart does not always show the months in the correct order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The chart has one expression to reset the selection from a selected month to a fiscal year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13545658040122198" jivemacro_uid="_13545658040122198"&gt;&lt;P&gt;sum({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; calendar.fiscal_year = {"$(=max(calendar.fiscal_year))"},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; calendar.yearmonth=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;}hc.annual_leave_hours) &lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sort tab in the chart uses a fiscal month number to sort.&amp;nbsp; October = 1, November = 2, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13545655399506989" jivemacro_uid="_13545655399506989"&gt;&lt;P&gt;calendar.fiscal_month_sort&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If no selection is made, the months are shown in fiscal month order&lt;/P&gt;&lt;P&gt;If a month is selected, the months are not shown in fiscal month order.&amp;nbsp; And the order of the months varies depending on the month selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I force the months to always appear in fiscal month order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached qvw shows what happens.&amp;nbsp; It has two sheets.&amp;nbsp; The sheets show the same issue, but they have different data models.&amp;nbsp; I simplified the data model in sheet - Model 2, to try to isolate the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The excel is the data behind the QVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The examples in the QVW are just a starting point.&amp;nbsp; Additional expressions, data sets and selection criteria will be added once this issue is figured out;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 20:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402311#M566321</guid>
      <dc:creator />
      <dc:date>2012-12-03T20:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402312#M566322</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;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 20:59:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402312#M566322</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-12-03T20:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402313#M566323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a set analysis.&amp;nbsp; Set your sort expression to: Only({1}calendar.fiscal_month_sort)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The {1} signifies that the current selection should be ignored, so the sort will be correct even when you select certain months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 00:39:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402313#M566323</guid>
      <dc:creator />
      <dc:date>2012-12-04T00:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402314#M566324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John and Mayil, thank you.&amp;nbsp; You both had the same answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand why {1} is used.&amp;nbsp; What is the purpose of using Only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 17:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402314#M566324</guid>
      <dc:creator />
      <dc:date>2012-12-04T17:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402315#M566325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;The help text describes Only() better than I could:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;Only(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;[{set_expression}] [distinct] [total[&amp;lt;fld {, fld}&amp;gt;]] expression&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;If &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; or &lt;SPAN class="Italic"&gt;field&lt;/SPAN&gt; iterated over the chart dimension(s) contain one single value, that value is returned, else NULL is returned.&amp;nbsp; &lt;SPAN class="Bold"&gt;Only&lt;/SPAN&gt; can return numeric values as well as text values. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 17:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402315#M566325</guid>
      <dc:creator />
      <dc:date>2012-12-04T17:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402316#M566326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd looked at that too, but couldn't figure out what that meant in the context of my issue.&amp;nbsp; Thanks, Steve&lt;/P&gt;&lt;P&gt;Edited:&amp;nbsp; I'll get there -- still figuring QlikView out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 17:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402316#M566326</guid>
      <dc:creator />
      <dc:date>2012-12-04T17:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402317#M566327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, sorry, didn't mean for my answer to be evasive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used Only() because it seemed like the most fitting given your situation.&amp;nbsp; Each fiscal months would have only one possible value for fiscal_month_sort, Only() would return that value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you could just as easily have used Max() or Min() (or other functions) in this situation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 17:54:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402317#M566327</guid>
      <dc:creator />
      <dc:date>2012-12-04T17:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Chart will not always sort by fiscal month</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402318#M566328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it.&amp;nbsp; Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 17:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-will-not-always-sort-by-fiscal-month/m-p/402318#M566328</guid>
      <dc:creator />
      <dc:date>2012-12-04T17:59:25Z</dc:date>
    </item>
  </channel>
</rss>

