<?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: How to add a Fiscal Year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1742170#M455436</link>
    <description>&lt;P&gt;Here is a Design Blog post on Fiscal Year calendar that may be helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Tue, 08 Sep 2020 20:55:48 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2020-09-08T20:55:48Z</dc:date>
    <item>
      <title>How to add a Fiscal Year</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1739087#M455434</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;Below is the list of the columns in a table ,where&lt;STRONG&gt; valid from&lt;/STRONG&gt; and &lt;STRONG&gt;valid to&lt;/STRONG&gt; are the calendar date.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plant&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Supplier&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Part&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ValidFrom&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ValidTo&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Price&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;HP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jolt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Screw&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;05-01-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25-07-2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;/P&gt;&lt;P&gt;I am trying to add a column &lt;STRONG&gt;Fiscal year&lt;/STRONG&gt; in above table which has to be derived from valid from and valid to columns ,as shown below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plant&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Supplier&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Part&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ValidFrom&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ValidTo&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Price&amp;nbsp; &amp;nbsp; &amp;nbsp;FiscalYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;HP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jolt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Screw&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;05-01-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25-07-2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2018&lt;/P&gt;&lt;P&gt;&amp;nbsp;HP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jolt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Screw&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;05-01-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25-07-2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;HP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jolt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Screw&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;05-01-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25-07-2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2020&lt;/P&gt;&lt;P&gt;&amp;nbsp;HP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jolt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Screw&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;05-01-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25-07-2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2021&lt;/P&gt;&lt;P&gt;&amp;nbsp;HP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jolt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Screw&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;05-01-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25-07-2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2022&lt;/P&gt;&lt;P&gt;as the &lt;STRONG&gt;Valid from&lt;/STRONG&gt;&amp;nbsp;of a &lt;STRONG&gt;price&lt;/STRONG&gt; for the specified plant,supplier,part is from 05-01-2018&amp;nbsp; &amp;nbsp;and valid to 25-07-2021 ,which means the price is valid for more than 4 calender Yrs in term of Fiscal year it will be more than 5 yrs.&lt;/P&gt;&lt;P&gt;so i need to derive a column name Fiscal Year from &lt;STRONG&gt;valid from&lt;/STRONG&gt; and &lt;STRONG&gt;Valid to &lt;/STRONG&gt;for&amp;nbsp; a&lt;STRONG&gt; plant,supplier,part combination&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How to achieve this at backend scripting&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Naveen&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1739087#M455434</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2024-11-16T00:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Fiscal Year</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1740077#M455435</link>
      <description>&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;The first thought I had was to run some for loops over the data. &amp;nbsp;&lt;/P&gt;&lt;P&gt;I know there is going to be a better (more efficient) way of doing this, probably using IntervalMatch or something like that, however, I suspect this will do what you want too.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Rod&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Load in the data
[Data]:
Load * Inline[
Plant, Supplier, Part, ValidFrom, ValidTo, Price
HP, Jolt, Screw, 05-01-2018, 25-07-2021, 100
];

// Loop through and add the FiscalYear field to the original data set
Let vParts = FieldValueCount('Part');

For i = 1 to $(vParts)
	vStart = Peek('ValidFrom', $(i)-1, 'Data');
	vEnd = Peek('ValidTo', $(i)-1, 'Data');
	
	Let vYears = Year(Date#(vEnd, 'DD-MM-YYYY')) - Year(Date#(vStart, 'DD-MM-YYYY'));
	
	For j = 0 to $(vYears)
	
	[Final data]:
	Load
		Year(Date#('$(vStart)', 'DD-MM-YYYY')) + $(j)	As FiscalYear,
		*
	Resident Data;
	Next j
Next i
	
// Tidy up by removing definitions table
Drop Table Data;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 23:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1740077#M455435</guid>
      <dc:creator>rodjager</dc:creator>
      <dc:date>2020-08-31T23:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Fiscal Year</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1742170#M455436</link>
      <description>&lt;P&gt;Here is a Design Blog post on Fiscal Year calendar that may be helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 20:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1742170#M455436</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-09-08T20:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Fiscal Year</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1742192#M455437</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/1135"&gt;@kunkumnaveen&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[Data]:
LOAD *,
     FiscalYearStart+IterNo()-1 as FiscalYear
While FiscalYearStart+IterNo()-1&amp;lt;=FiscalYearEnd;

LOAD *,
     year(YearStart(ValidFrom,0,4))+1 as FiscalYearStart,
     year(YearStart(ValidTo,0,4))+1 as FiscalYearEnd;

Load * Inline[
Plant, Supplier, Part, ValidFrom, ValidTo, Price
HP, Jolt, Screw, 05-01-2018, 25-07-2021, 100
];

DROP Fields FiscalYearStart,FiscalYearEnd;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-09-08 235621.png" style="width: 379px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/40249iF32909458DBA2F5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-09-08 235621.png" alt="Annotation 2020-09-08 235621.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 22:56:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-a-Fiscal-Year/m-p/1742192#M455437</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-08T22:56:58Z</dc:date>
    </item>
  </channel>
</rss>

