<?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: N-1 set analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929141#M76494</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Try the following expression:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=, Date_Facture=, &lt;BR /&gt;Date_Facture={"&amp;gt;=$(=(Addmonths(YearStart(Max(Date_Calendar)),-12))) &amp;lt;=$(=Addmonths(today(today(Date_Calendar),),-12))"}&lt;BR /&gt;, Type_Facture = {'FACTURES'}, Site_Facture = {'XXXX'}, Code_Client-={'CLIENTSX'}&amp;gt;}Montant_HT_Ligne_Facture)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used your first expression and in order to calculate the last year, I just removed 12 months by using AddMonths(..., -12).&lt;/P&gt;
&lt;P&gt;I hope it helps!&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Hugo Romeira&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 10:44:33 GMT</pubDate>
    <dc:creator>HugoRomeira_PT</dc:creator>
    <dc:date>2022-05-11T10:44:33Z</dc:date>
    <item>
      <title>N-1 set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929094#M76492</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I want to calculate this formula for N-1.&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=, Date_Facture=, Date_Facture={"&amp;gt;=$(=(YearStart(Max(Date_Calendar)))) &amp;lt;=$(=today(today(Date_Calendar),))"}, Type_Facture = {'FACTURES'}, Site_Facture = {'XXXX'}, Code_Client-={'CLIENTSX'}&amp;gt;}Montant_HT_Ligne_Facture)&lt;/P&gt;
&lt;P&gt;I have test this but no working:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=, Day=, Date_Facture=, Date_Facture={"&amp;gt;=$(=(YearStart(Max(Date_Calendar),-1))) &amp;lt;=$(=dayend(today(Date_Calendar),-365))"}, Type_Facture = {'FACTURES'}, Site_Facture = {'XXXX'}, Code_Client-={'CLIENTSX'}&amp;gt;}Montant_HT_Ligne_Facture)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone have an idea for calculate YTD N-1 (day is today N-1)&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 09:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929094#M76492</guid>
      <dc:creator>squalitooo</dc:creator>
      <dc:date>2022-05-11T09:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: N-1 set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929141#M76494</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Try the following expression:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=, Date_Facture=, &lt;BR /&gt;Date_Facture={"&amp;gt;=$(=(Addmonths(YearStart(Max(Date_Calendar)),-12))) &amp;lt;=$(=Addmonths(today(today(Date_Calendar),),-12))"}&lt;BR /&gt;, Type_Facture = {'FACTURES'}, Site_Facture = {'XXXX'}, Code_Client-={'CLIENTSX'}&amp;gt;}Montant_HT_Ligne_Facture)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used your first expression and in order to calculate the last year, I just removed 12 months by using AddMonths(..., -12).&lt;/P&gt;
&lt;P&gt;I hope it helps!&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Hugo Romeira&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 10:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929141#M76494</guid>
      <dc:creator>HugoRomeira_PT</dc:creator>
      <dc:date>2022-05-11T10:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: N-1 set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929145#M76495</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;may be this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this second expression return a timestamp for you use dayend () :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dayend(today(Date_Calendar),-365))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brunobertels_1-1652266066265.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79164i05F03BDAE392363C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brunobertels_1-1652266066265.png" alt="brunobertels_1-1652266066265.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;so same day last year should be&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brunobertels_0-1652265992997.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79163i6E03C6E7ECA961A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brunobertels_0-1652265992997.png" alt="brunobertels_0-1652265992997.png" /&gt;&lt;/span&gt;&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, 11 May 2022 10:48:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929145#M76495</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2022-05-11T10:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: N-1 set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929218#M76500</link>
      <description>&lt;P&gt;&lt;STRONG&gt;CurrentYear YTD&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=, &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Date_Facture=, &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Date_Facture={"&amp;gt;=$(=Date(YearStart(Max(Date_Calendar)),'&lt;STRONG&gt;YYYY-MM-DD&lt;/STRONG&gt;')&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; &amp;lt;=$(=Date(Max(Date_Calendar),'&lt;STRONG&gt;YYYY-MM-DD&lt;/STRONG&gt;')) "}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;, Type_Facture = {'FACTURES'}, Site_Facture = {'XXXX'}, Code_Client-={'CLIENTSX'}&amp;gt;}Montant_HT_Ligne_Facture)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous Year YTD&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Date_Facture=,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Date_Facture={"&amp;gt;=$(=Date(YearStart(Max(Date_Calendar),-1),'&lt;STRONG&gt;YYYY-MM-DD&lt;/STRONG&gt;')&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;=$(=Date(addyears(Max(Date_Calendar),-1),'&lt;STRONG&gt;YYYY-MM-DD&lt;/STRONG&gt;')) "}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;, Type_Facture = {'FACTURES'}, Site_Facture = {'XXXX'}, Code_Client-={'CLIENTSX'}&amp;gt;}Montant_HT_Ligne_Facture)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Replace&amp;nbsp;&lt;STRONG&gt;YYYY-MM-DD in the above expressions to match the date format of the field&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 12:42:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/N-1-set-analysis/m-p/1929218#M76500</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-05-11T12:42:02Z</dc:date>
    </item>
  </channel>
</rss>

