<?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: Today's date for each year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046211#M86052</link>
    <description>&lt;P&gt;create a field in the loadscript using&lt;/P&gt;
&lt;P&gt;daynumberofyear(date) as daynumberofyear,&lt;/P&gt;
&lt;P&gt;and a variable&lt;/P&gt;
&lt;P&gt;Let vDaynumberofyearToday =&amp;nbsp;daynumberofyear(today());&lt;/P&gt;
&lt;P&gt;and&amp;nbsp; use a set expression like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{$&amp;lt;daynumberofyear={"&amp;lt;=vDaynumberofyearToday"}&amp;gt;}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, just create field with a flag in the load script&lt;/P&gt;
&lt;P&gt;if(daynumberofyear(date)&amp;lt;=daynumerofyear(today()), 1,0) as [daynumber_flag] and filter on the flag.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the probably more efficient than the first alternative, if you don't need to know the daynumber.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please like and mark my answer as a solution, if it resolved your issue.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 14:10:14 GMT</pubDate>
    <dc:creator>E_Røse</dc:creator>
    <dc:date>2023-03-07T14:10:14Z</dc:date>
    <item>
      <title>Today's date for each year</title>
      <link>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046206#M86050</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I need help with creating a chart showing sales for all years until now (2019 to 2023) but only up to today's date. Basically as we are 7th of March today, I will need to see sales for 2023 until 7th of March 2023, for 2022 until 7th of March 2022, for 2021 until 7th of March 2021 and so on... Tomorrow it will have to change to 8th of March for all years and etc.&lt;BR /&gt;&lt;BR /&gt;It feels very simple, but I am actually having a very hard time thinking of a logic that I can implement in the script.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 13:46:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046206#M86050</guid>
      <dc:creator>SilviyaK</dc:creator>
      <dc:date>2023-03-07T13:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Today's date for each year</title>
      <link>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046211#M86052</link>
      <description>&lt;P&gt;create a field in the loadscript using&lt;/P&gt;
&lt;P&gt;daynumberofyear(date) as daynumberofyear,&lt;/P&gt;
&lt;P&gt;and a variable&lt;/P&gt;
&lt;P&gt;Let vDaynumberofyearToday =&amp;nbsp;daynumberofyear(today());&lt;/P&gt;
&lt;P&gt;and&amp;nbsp; use a set expression like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{$&amp;lt;daynumberofyear={"&amp;lt;=vDaynumberofyearToday"}&amp;gt;}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, just create field with a flag in the load script&lt;/P&gt;
&lt;P&gt;if(daynumberofyear(date)&amp;lt;=daynumerofyear(today()), 1,0) as [daynumber_flag] and filter on the flag.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the probably more efficient than the first alternative, if you don't need to know the daynumber.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please like and mark my answer as a solution, if it resolved your issue.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 14:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046211#M86052</guid>
      <dc:creator>E_Røse</dc:creator>
      <dc:date>2023-03-07T14:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Today's date for each year</title>
      <link>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046214#M86053</link>
      <description>&lt;P&gt;I forget if there's a function to do this directly - there probably is and I just can't remember - but you could use something like&lt;/P&gt;
&lt;P&gt;InYearToDate(Date,MakeDate(Year(Date))) as IsYTDFlag&lt;/P&gt;
&lt;P&gt;And then use that flag in your set analysis.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 14:02:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046214#M86053</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-03-07T14:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Today's date for each year</title>
      <link>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046220#M86054</link>
      <description>&lt;P&gt;Thanks both!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried with Elin's solution because I saw it first and it worked perfectly!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 14:15:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Today-s-date-for-each-year/m-p/2046220#M86054</guid>
      <dc:creator>SilviyaK</dc:creator>
      <dc:date>2023-03-07T14:15:30Z</dc:date>
    </item>
  </channel>
</rss>

