<?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 Get yearstart (and -end) of previous year of the selected year in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/Get-yearstart-and-end-of-previous-year-of-the-selected-year/m-p/2060503#M228202</link>
    <description>&lt;P&gt;Hallo,&lt;/P&gt;
&lt;P&gt;I need the yearstart (and "-end", respectively last year today) of previous year of the selected year:&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Current year: &lt;STRONG&gt;2023&lt;/STRONG&gt;&lt;BR /&gt;Selected year: &lt;STRONG&gt;2022&lt;BR /&gt;Needed:&lt;BR /&gt;&lt;/STRONG&gt;Yearstart: 01.01.&lt;STRONG&gt;2021&lt;BR /&gt;&lt;/STRONG&gt;End: 31.12.&lt;STRONG&gt;2021&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So far I have used:&lt;BR /&gt;&lt;EM&gt;SUM(sales.date = {"&amp;gt;=$(=yearstart(today(),-1)) &amp;lt;=$(=date(addmonths(MonthEnd(Today()),-12)))"}&amp;gt;}sales)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;But this only applies to the current year (&lt;EM&gt;today()&lt;/EM&gt;) and not to the selected year.&lt;/P&gt;
&lt;P&gt;Who can help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2023 11:32:37 GMT</pubDate>
    <dc:creator>reporting_neu</dc:creator>
    <dc:date>2023-04-14T11:32:37Z</dc:date>
    <item>
      <title>Get yearstart (and -end) of previous year of the selected year</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Get-yearstart-and-end-of-previous-year-of-the-selected-year/m-p/2060503#M228202</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt;
&lt;P&gt;I need the yearstart (and "-end", respectively last year today) of previous year of the selected year:&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Current year: &lt;STRONG&gt;2023&lt;/STRONG&gt;&lt;BR /&gt;Selected year: &lt;STRONG&gt;2022&lt;BR /&gt;Needed:&lt;BR /&gt;&lt;/STRONG&gt;Yearstart: 01.01.&lt;STRONG&gt;2021&lt;BR /&gt;&lt;/STRONG&gt;End: 31.12.&lt;STRONG&gt;2021&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So far I have used:&lt;BR /&gt;&lt;EM&gt;SUM(sales.date = {"&amp;gt;=$(=yearstart(today(),-1)) &amp;lt;=$(=date(addmonths(MonthEnd(Today()),-12)))"}&amp;gt;}sales)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;But this only applies to the current year (&lt;EM&gt;today()&lt;/EM&gt;) and not to the selected year.&lt;/P&gt;
&lt;P&gt;Who can help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 11:32:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Get-yearstart-and-end-of-previous-year-of-the-selected-year/m-p/2060503#M228202</guid>
      <dc:creator>reporting_neu</dc:creator>
      <dc:date>2023-04-14T11:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get yearstart (and -end) of previous year of the selected year</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Get-yearstart-and-end-of-previous-year-of-the-selected-year/m-p/2060511#M228205</link>
      <description>&lt;P&gt;Hi, maybe instead today() you can use max(year) as if you select year it will filter your datefield. Expression could look like this:&lt;/P&gt;
&lt;P&gt;=sum({&amp;lt;sales.date={"&amp;gt;=$(=Date(yearstart(Max(sales.date),-1)))&amp;lt;=$(=Date(yearsend(Max(sales.date),-1)))"}&amp;gt;} sales)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 12:03:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Get-yearstart-and-end-of-previous-year-of-the-selected-year/m-p/2060511#M228205</guid>
      <dc:creator>justISO</dc:creator>
      <dc:date>2023-04-14T12:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get yearstart (and -end) of previous year of the selected year</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Get-yearstart-and-end-of-previous-year-of-the-selected-year/m-p/2060530#M228210</link>
      <description>&lt;P&gt;Perfect! Thank you so much.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 13:17:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Get-yearstart-and-end-of-previous-year-of-the-selected-year/m-p/2060530#M228210</guid>
      <dc:creator>reporting_neu</dc:creator>
      <dc:date>2023-04-14T13:17:35Z</dc:date>
    </item>
  </channel>
</rss>

