<?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 Dynamic Fiscal Year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Fiscal-Year/m-p/1566661#M41317</link>
    <description>&lt;P&gt;Further to &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103#comments" target="_blank" rel="noopener"&gt;HIC's design blog on fiscal year,&amp;nbsp;&lt;/A&gt;I needed to make this fiscal start dynamic, see below for details.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Using Qlik Sense, Novermber 2018 Patch 2&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I don't know if this is useful to anyone, but I had a requirement where the startmonth had to be dynamic as the start month was different in different user cases. In this case having the solution in the script wouldn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the example above, I created a master dimension called Contract Month (calculated dimension if in QlikView)&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Contract Year&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;=dual((Year+ If( Month&amp;gt;=&lt;SPAN&gt;&lt;EM&gt;$(vFM)&lt;/EM&gt;&lt;/SPAN&gt;, 1, 0)-1) &amp;amp;'/'&amp;amp; ([Display Year] + If( Month&amp;gt;=&lt;SPAN&gt;&lt;EM&gt;$(vFM),&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;1, 0)) ,[Display Year] + If( Month&amp;gt;=&lt;SPAN&gt;&lt;EM&gt;$(vFM)&lt;/EM&gt;&lt;/SPAN&gt;, 1, 0))&lt;/P&gt;&lt;P&gt;I use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Month Year&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field that is already stored but I sort by expression ascending using:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Mod&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Month&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;&lt;EM&gt;$(vFM)&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;, 12)+1&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I then create a drop down list that holds the variable&amp;nbsp;&lt;EM&gt;$(vFM)&amp;nbsp;&lt;/EM&gt;and shows the months of the year with their corresponding month value (Jan (1), Feb (2) etc. ) and this control the beginning of the year.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2019 21:42:05 GMT</pubDate>
    <dc:creator>Onyi_Nwabia-Robbins</dc:creator>
    <dc:date>2019-04-08T21:42:05Z</dc:date>
    <item>
      <title>Dynamic Fiscal Year</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Fiscal-Year/m-p/1566661#M41317</link>
      <description>&lt;P&gt;Further to &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103#comments" target="_blank" rel="noopener"&gt;HIC's design blog on fiscal year,&amp;nbsp;&lt;/A&gt;I needed to make this fiscal start dynamic, see below for details.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Using Qlik Sense, Novermber 2018 Patch 2&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I don't know if this is useful to anyone, but I had a requirement where the startmonth had to be dynamic as the start month was different in different user cases. In this case having the solution in the script wouldn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the example above, I created a master dimension called Contract Month (calculated dimension if in QlikView)&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Contract Year&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;=dual((Year+ If( Month&amp;gt;=&lt;SPAN&gt;&lt;EM&gt;$(vFM)&lt;/EM&gt;&lt;/SPAN&gt;, 1, 0)-1) &amp;amp;'/'&amp;amp; ([Display Year] + If( Month&amp;gt;=&lt;SPAN&gt;&lt;EM&gt;$(vFM),&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;1, 0)) ,[Display Year] + If( Month&amp;gt;=&lt;SPAN&gt;&lt;EM&gt;$(vFM)&lt;/EM&gt;&lt;/SPAN&gt;, 1, 0))&lt;/P&gt;&lt;P&gt;I use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Month Year&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field that is already stored but I sort by expression ascending using:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Mod&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Month&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;&lt;EM&gt;$(vFM)&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;, 12)+1&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I then create a drop down list that holds the variable&amp;nbsp;&lt;EM&gt;$(vFM)&amp;nbsp;&lt;/EM&gt;and shows the months of the year with their corresponding month value (Jan (1), Feb (2) etc. ) and this control the beginning of the year.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 21:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Fiscal-Year/m-p/1566661#M41317</guid>
      <dc:creator>Onyi_Nwabia-Robbins</dc:creator>
      <dc:date>2019-04-08T21:42:05Z</dc:date>
    </item>
  </channel>
</rss>

