<?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: Julian Calendar selections in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460205#M98779</link>
    <description>&lt;P&gt;This is the script I'm running after the QVD is created from the SQL script&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hannes_0-1717756210079.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167516iBB085F13D2D4AD9C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hannes_0-1717756210079.png" alt="Hannes_0-1717756210079.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 10:30:35 GMT</pubDate>
    <dc:creator>Hannes</dc:creator>
    <dc:date>2024-06-07T10:30:35Z</dc:date>
    <item>
      <title>Julian Calendar selections</title>
      <link>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2459922#M98756</link>
      <description>&lt;P&gt;Hi all.&lt;BR /&gt;&lt;BR /&gt;I am working with a Julian Calendar which is built via a 3rd party using SQL. I use that same SQL script in Qlik Sense to store it as a QVD with only the current and previous calendar year.&lt;BR /&gt;&lt;BR /&gt;I have a date field that contains the dates for the current and previous year and then also a DayNum field to whichs numbers the days of the year.&lt;BR /&gt;&lt;BR /&gt;To start off with an example&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hannes_0-1717681054195.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167465iFE54965917B71505/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hannes_0-1717681054195.png" alt="Hannes_0-1717681054195.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My Client wants to be able to select a date in the latest financial year only and that should link up with the corresponding date based on the day number in order to do a CYTD vs PYTD calculations.&lt;BR /&gt;&lt;BR /&gt;Just to add an example. Once we get to Fin Year 2027 and 2028, my year will start with 2026/06/29 for fin 2027 and the fin year 2028 will start on 2028/07/05&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Would this be something that I do in the front end or the back end and also, how would I go about it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 13:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2459922#M98756</guid>
      <dc:creator>Hannes</dc:creator>
      <dc:date>2024-06-06T13:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Julian Calendar selections</title>
      <link>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460179#M98776</link>
      <description>&lt;P&gt;All calendar-related information should be created within the script and the day-number could be easily derived against the year and interrecord-function like:&lt;/P&gt;
&lt;P&gt;if(Year = previous(Year), peek('DayNumber') + 1, 1) as DayNumber&lt;/P&gt;
&lt;P&gt;and an UI expression may relate to it with:&lt;/P&gt;
&lt;P&gt;sum({&amp;lt; Date, DayNumber = p(DayNumber)&amp;gt;} Value)&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 09:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460179#M98776</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-06-07T09:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Julian Calendar selections</title>
      <link>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460205#M98779</link>
      <description>&lt;P&gt;This is the script I'm running after the QVD is created from the SQL script&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hannes_0-1717756210079.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167516iBB085F13D2D4AD9C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hannes_0-1717756210079.png" alt="Hannes_0-1717756210079.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 10:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460205#M98779</guid>
      <dc:creator>Hannes</dc:creator>
      <dc:date>2024-06-07T10:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Julian Calendar selections</title>
      <link>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460218#M98781</link>
      <description>&lt;P&gt;FIN_YearDesc seems to be suitable for the above mentioned measurement. Important is by the use of interrecord-functions to ensure the needed ordering of the records - which usually exists by the common calendar-creation within Qlik.&lt;/P&gt;
&lt;P&gt;By loading the data from an external source you may need an extra pre-loading of the data to be able to apply an appropriate order by statement within a resident-load.&lt;/P&gt;
&lt;P&gt;Beside this - if there is already a DayNum logic based on an offset-calculation you may have already everything what you wanted and could skip the above stuff.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 11:02:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460218#M98781</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-06-07T11:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Julian Calendar selections</title>
      <link>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460259#M98787</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1- Load the Julian Calendar QVD:&lt;/P&gt;
&lt;P&gt;2- Calculate the Financial Year Start Date:&lt;/P&gt;
&lt;P&gt;Create a field that determines the start date of the financial year based on your criteria (e.g., 2026/06/29 for 2027).&lt;/P&gt;
&lt;P&gt;JulianCalendar:&lt;BR /&gt;LOAD *,&lt;BR /&gt;IF(DateField &amp;gt;= vFinYearStart AND DateField &amp;lt;= vFinYearEnd, 1, 0) as IsLatestFinYear&lt;BR /&gt;RESIDENT JulianCalendar;&lt;/P&gt;
&lt;P&gt;1- Order the Data:&lt;BR /&gt;• Ensure the data is ordered correctly using an ORDER BY clause if necessary.&lt;/P&gt;
&lt;P&gt;Frontend:&lt;/P&gt;
&lt;P&gt;1- To calculate sums for the current and previous financial years dynamically.&lt;/P&gt;
&lt;P&gt;vCYTD = Sum({&amp;lt;Year = {$(=Max(Year))}, IsLatestFinYear = {1}&amp;gt;} Sales)&lt;BR /&gt;vPYTD = Sum({&amp;lt;Year = {$(=Max(Year)-1)}, IsLatestFinYear = {1}&amp;gt;} Sales)&lt;/P&gt;
&lt;P&gt;2- Use the variables to display the CYTD vs PYTD calculations.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 13:09:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2460259#M98787</guid>
      <dc:creator>TauseefKhan</dc:creator>
      <dc:date>2024-06-07T13:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Julian Calendar selections</title>
      <link>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2461053#M98842</link>
      <description>&lt;P&gt;Thank you all for your time and effort regarding my querry. I managed to resolve the issue that I was facing with the following scenario.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So, I load my Julian calendar qvd as per above. Then because I only load 2 financial years of data, I use the peek function to set variables&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hannes_0-1718089031985.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167687i7222FB3CF94F8401/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hannes_0-1718089031985.png" alt="Hannes_0-1718089031985.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Once that is done, I then split the calendar into 2 with the min and max financial year. and use the DayNum field that I created as my key.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hannes_1-1718089130757.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167688i6AFAD300FFEBB12B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hannes_1-1718089130757.png" alt="Hannes_1-1718089130757.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With this, I am able to use the max year table's calendar date in my filter to select my date/date range and that will then select my corresponding dates in the previous year based on the DayNum field&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hannes_2-1718089372518.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167689i173164E9565446EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hannes_2-1718089372518.png" alt="Hannes_2-1718089372518.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the front end, I then make use of set analysis for my CYTD &amp;amp; PYTD calculations. Works perfect and compared the results with what the client has.&lt;BR /&gt;&lt;BR /&gt;Thank you all once again for your time and effort&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 07:04:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Julian-Calendar-selections/m-p/2461053#M98842</guid>
      <dc:creator>Hannes</dc:creator>
      <dc:date>2024-06-11T07:04:30Z</dc:date>
    </item>
  </channel>
</rss>

