<?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: Dynamic Fiscal Year Formula in NPrinting Report in Qlik NPrinting</title>
    <link>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1860191#M34138</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you are using $ sign expansion on your variable&amp;nbsp; vSeasonTest preceded with "=" sign.&lt;/P&gt;
&lt;P&gt;which is for example $(=2021-2022)&lt;/P&gt;
&lt;P&gt;That means that QlikView will try to calculate that deduction.. and simply throws an error.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;My suggestion is to call variable without "=" sign - like $(vSeasonTest) instead of&amp;nbsp;$(=vSeasonTest)&lt;/LI&gt;
&lt;LI&gt;Second thing is to actually wrap it is single quotes as you are doing text search in set analysis
&lt;OL&gt;
&lt;LI&gt;....FiscalYear=&lt;FONT color="#FF0000"&gt;{'&lt;/FONT&gt;$(vSeasonTest)&lt;FONT color="#FF0000"&gt;'}...&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Those are couple basic issues I could spot at first glance..&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;You may ask why does your formula work for Week then since you are using the same $(=variable) approach? It is because of values returned being 2021-2022 for years which Qlik will translate as:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color="#000000"&gt;2021-2022=-1&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;On contrary for week you are likely getting text which cannot be translated to anything else - hence it works. I would however fix your week variable call in set analysis too to avoid further issues.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;cheers&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2021 07:36:29 GMT</pubDate>
    <dc:creator>Lech_Miszkiewicz</dc:creator>
    <dc:date>2021-11-17T07:36:29Z</dc:date>
    <item>
      <title>Dynamic Fiscal Year Formula in NPrinting Report</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1855310#M34022</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a formula here (see below) which is being used in an NPrinting report.&lt;/P&gt;
&lt;P&gt;I would like to make the value "2021-2022" dynamic for the FiscalYear field in this formula by using a variable (similar to the weeks variable I have in the formula).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dynamic Fiscal Year.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/65881iE4C1D1C7850E80BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dynamic Fiscal Year.jpg" alt="Dynamic Fiscal Year.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is there a way that this can be done?&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 22:14:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1855310#M34022</guid>
      <dc:creator>NishantPatel</dc:creator>
      <dc:date>2021-11-03T22:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Fiscal Year Formula in NPrinting Report</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1855317#M34024</link>
      <description>&lt;P&gt;Here is a suggestion:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;Create a variable in your source application (QVW or QVF) using the underlying formula you posted above (make sure it works by testing in your source app first)&lt;/LI&gt;
 &lt;LI&gt;Save the QVF or QVW&lt;/LI&gt;
 &lt;LI&gt;Reload the NP connection so the variable becomes available&lt;/LI&gt;
 &lt;LI&gt;Then Use the variable tool in NPrinting Designer to add your variable to the report.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/fe8e3b51-0dbc-4dc8-8ac7-4cda65506acd.default.PNG" style="height:319px; width:512px" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Perhaps you also or only need an variable filter in NPrinting as well.&lt;/P&gt;

&lt;P&gt;For this see:&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Work-with-variables.htm" target="_blank"&gt;https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Work-with-variables.htm&lt;/A&gt;&lt;/LI&gt;
 &lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Static-dynamic-filters.htm#anchor-10" target="_blank"&gt;https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Static-dynamic-filters.htm#anchor-10&lt;/A&gt; (this explains how to create a variable based filter if thats what you actually need).&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Kind regards...&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 22:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1855317#M34024</guid>
      <dc:creator>Frank_S</dc:creator>
      <dc:date>2021-11-03T22:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Fiscal Year Formula in NPrinting Report</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1855357#M34027</link>
      <description>&lt;P&gt;I believe &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48712"&gt;@Frank_S&lt;/a&gt;&amp;nbsp;'s suggestion covers how to add a new variable in your NPrinting report.&lt;/P&gt;
&lt;P&gt;If you have trouble defining the variable, then take a look at the yearname() function. It can be helpful for achieving your desired&amp;nbsp; variable. &lt;A href="https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunctions/yearname.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunctions/yearname.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 05:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1855357#M34027</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2021-11-04T05:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Fiscal Year Formula in NPrinting Report</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1860186#M34137</link>
      <description>&lt;P&gt;Hi Frank and Vegar,&lt;/P&gt;
&lt;P&gt;Thank you for your suggestions.&lt;/P&gt;
&lt;P&gt;I already have an existing variable in my source app (QVW) to dynamically calculate the week as per below screenshot.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NishantPatel_1-1637118813743.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66783i928F9985C773683B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NishantPatel_1-1637118813743.png" alt="NishantPatel_1-1637118813743.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the same way I created a new variable in my source app (QVW) to dynamically calculate the fiscal season by using the yearname() function (as suggested by Vegar). The fiscal season starts from 1st August, hence why I used "8" which then returns the appropriate fiscal season (i.e. 2021-2022).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NishantPatel_2-1637119136679.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66784i90D1F7AE63444489/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NishantPatel_2-1637119136679.png" alt="NishantPatel_2-1637119136679.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I then applied this new variable (vSeasonTest) into my existing formula in the NPrinting report and ran a preview of the report.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NishantPatel_3-1637119547380.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66785i93FEE5975612987A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NishantPatel_3-1637119547380.png" alt="NishantPatel_3-1637119547380.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After running a preview of the report, I came across this error message.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NishantPatel_4-1637119907390.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66786i0DB25E06A2B945F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NishantPatel_4-1637119907390.png" alt="NishantPatel_4-1637119907390.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Could you please advise?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 03:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1860186#M34137</guid>
      <dc:creator>NishantPatel</dc:creator>
      <dc:date>2021-11-17T03:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Fiscal Year Formula in NPrinting Report</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1860191#M34138</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you are using $ sign expansion on your variable&amp;nbsp; vSeasonTest preceded with "=" sign.&lt;/P&gt;
&lt;P&gt;which is for example $(=2021-2022)&lt;/P&gt;
&lt;P&gt;That means that QlikView will try to calculate that deduction.. and simply throws an error.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;My suggestion is to call variable without "=" sign - like $(vSeasonTest) instead of&amp;nbsp;$(=vSeasonTest)&lt;/LI&gt;
&lt;LI&gt;Second thing is to actually wrap it is single quotes as you are doing text search in set analysis
&lt;OL&gt;
&lt;LI&gt;....FiscalYear=&lt;FONT color="#FF0000"&gt;{'&lt;/FONT&gt;$(vSeasonTest)&lt;FONT color="#FF0000"&gt;'}...&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Those are couple basic issues I could spot at first glance..&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;You may ask why does your formula work for Week then since you are using the same $(=variable) approach? It is because of values returned being 2021-2022 for years which Qlik will translate as:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color="#000000"&gt;2021-2022=-1&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;On contrary for week you are likely getting text which cannot be translated to anything else - hence it works. I would however fix your week variable call in set analysis too to avoid further issues.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;cheers&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 07:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1860191#M34138</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2021-11-17T07:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Fiscal Year Formula in NPrinting Report</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1862800#M34215</link>
      <description>&lt;P&gt;Hi Lech,&lt;/P&gt;
&lt;P&gt;Thanks for your solution.&lt;/P&gt;
&lt;P&gt;I have been able to get it working.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 22:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Dynamic-Fiscal-Year-Formula-in-NPrinting-Report/m-p/1862800#M34215</guid>
      <dc:creator>NishantPatel</dc:creator>
      <dc:date>2021-11-23T22:33:24Z</dc:date>
    </item>
  </channel>
</rss>

