<?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: Previous YTD, until the end of current month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588485#M43092</link>
    <description>&lt;P&gt;Independant of any selection?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if u select 04/03/2018 for example?&lt;/P&gt;&lt;P&gt;u don't want to it to return :&lt;/P&gt;&lt;P&gt;01/01/2017 to 31/03/2017?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if not use today, if u want to recalculate the limits, use max5date) as seen&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2019 09:17:09 GMT</pubDate>
    <dc:creator>OmarBenSalem</dc:creator>
    <dc:date>2019-06-05T09:17:09Z</dc:date>
    <item>
      <title>Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588433#M43082</link>
      <description>&lt;DIV class="tlid-input input"&gt;&lt;DIV class="source-wrap"&gt;&lt;DIV class="input-full-height-wrapper tlid-input-full-height-wrapper"&gt;&lt;DIV class="source-input"&gt;&lt;DIV class="source-footer-wrap source-or-target-footer"&gt;&lt;DIV class="character-count tlid-character-count"&gt;&lt;DIV class="cc-ctr normal"&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="tlid-results-container results-container"&gt;&lt;DIV class="tlid-result result-dict-wrapper"&gt;&lt;DIV class="result tlid-copy-target"&gt;&lt;DIV class="text-wrap tlid-copy-target"&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;I have to calculate the sum of sales based on the YTD for the PREVIOUS YEAR, but not until today: I have to consider the last day of the current month for the previous year.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Example: Today is 05/06/2019 -&amp;gt; so I have to sum up the sales &lt;STRONG&gt;starting from 01/01/2018 until 30/06/2018&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the best way to do it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alessandro&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588433#M43082</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2024-11-16T05:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588440#M43083</link>
      <description>&lt;P&gt;Here how u should think it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ur date condition should be sthing like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date={&amp;gt;=01/01/2018&amp;lt;=30/06/2018}&lt;/P&gt;&lt;P&gt;We then must find a way to calculate these 2 dates based on ur selection:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ur selection of date would be : Max(Date) why?; if u don't select any date, max date would be ur last available date&lt;/P&gt;&lt;P&gt;if u do select a date ; max(Date) returns ur selected date.&lt;/P&gt;&lt;P&gt;Now, 01/01/2018 is the FIRST day of LAST YEAR:&lt;/P&gt;&lt;P&gt;let's say, w've selected : 04/06/2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Max(Date) = 04/06/2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to go back one year before : AddYears(Max(Date),-1) : 04/06/201&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to return the First day of the year? YearStart(04/06/2018) =&amp;nbsp;YearStart(AddYears(Max(Date),-1)) = 01/01/2018&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now for the 30/06/2019 part : this is the Last day of the month of the selected Date (max(Date))&lt;/P&gt;&lt;P&gt;=&amp;gt; MonthEnd function:&lt;/P&gt;&lt;P&gt;MonthEnd(Max(Date)) = 30/06/2019&lt;/P&gt;&lt;P&gt;to return one year before :&lt;/P&gt;&lt;P&gt;AddYears(MonthEnd(Max(Date)),-1) : 30/06/2018&lt;/P&gt;&lt;P&gt;ur expression should then be :&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date={"&amp;gt;=$(=YearStart(AddYears(Max(Date),-1)))&amp;lt;=$(=AddYears(MonthEnd(Max(Date)),-1) )"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;but this is not complete yet, u should break the relation between qlik and other date fields u have&lt;/P&gt;&lt;P&gt;sum({&amp;lt;&lt;STRONG&gt;Year,Month,Week,&lt;/STRONG&gt; Date={"&amp;gt;=$(=YearStart(AddYears(Max(Date),-1)))&amp;lt;=$(=AddYears(MonthEnd(Max(Date)),-1) )"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;Why?&lt;/P&gt;&lt;P&gt;Suppose u've selected not a date but a Year :2019&lt;/P&gt;&lt;P&gt;so max(Date) would return the LAST DATE U HAVE in ur data in the Year 2019&lt;/P&gt;&lt;P&gt;Let's say it's 05/06/2019&lt;/P&gt;&lt;P&gt;so, "logically, our expression could return sales from 01/01/2018 to 30/06/2018 right?&lt;/P&gt;&lt;P&gt;NO :&amp;nbsp;&lt;/P&gt;&lt;P&gt;it'll return NOTHING because when u select Year =2019 : Qlik would SEE only the YEAR 2019 while u're trying to return data in 2018..&lt;/P&gt;&lt;P&gt;So, wht we do is Add the &lt;STRONG&gt;Year,Month,Week,&amp;nbsp;&lt;/STRONG&gt;part into our expression to tell Qlik to continue to see ALL years,months weeks even if we select a Year..&lt;/P&gt;&lt;P&gt;Hope that was clear enough..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps: this might help u :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-Qlik-Sense/YTD-MTD-issue/td-p/1278297" target="_blank"&gt;https://community.qlik.com/t5/New-to-Qlik-Sense/YTD-MTD-issue/td-p/1278297&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 08:01:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588440#M43083</guid>
      <dc:creator>OmarBenSalem</dc:creator>
      <dc:date>2019-06-05T08:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588447#M43085</link>
      <description>&lt;P&gt;Hi Omar,&lt;/P&gt;&lt;P&gt;thanks for your reply and suggestion.&lt;/P&gt;&lt;P&gt;I've tried to implement it but the "date end" returned is 31/12/2018 and NOT 30/06/2018, it seems Qlik doesn't consider the end of the current month for the previous year.&lt;/P&gt;&lt;P&gt;Maybe it's needed to introduce the "Today()" function into the Set Analysis?&lt;/P&gt;&lt;P&gt;This is the formula, applied as you suggested:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;sum({&amp;lt;Year=,Month=,Week=, date={"&amp;gt;=$(=YearStart(AddYears(Max(date),-1)))&amp;lt;=$(=AddYears(MonthEnd(Max(date)),-1) )"}&amp;gt;}importo_netto)&lt;/FONT&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, 05 Jun 2019 08:18:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588447#M43085</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2019-06-05T08:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588465#M43088</link>
      <description>&lt;P&gt;Please create 2 kpi objects&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)date(&amp;nbsp;&lt;SPAN&gt;MonthEnd(Max(date)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2)date( AddYears(MonthEnd(Max(date)),-1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tell me what these return&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 08:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588465#M43088</guid>
      <dc:creator>OmarBenSalem</dc:creator>
      <dc:date>2019-06-05T08:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588474#M43089</link>
      <description>&lt;P&gt;1)&amp;nbsp; date(&lt;SPAN&gt;MonthEnd(Max(date)))&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;--&amp;gt; 31/12/2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2)&amp;nbsp; date(AddYears(MonthEnd(Max(date)),-1))&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;--&amp;gt; 31/12/2018&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;I'm using Qlik Sense, last version.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 09:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588474#M43089</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2019-06-05T09:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588478#M43090</link>
      <description>&lt;P&gt;select 05/06/2019, what does it return in this case?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 09:10:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588478#M43090</guid>
      <dc:creator>OmarBenSalem</dc:creator>
      <dc:date>2019-06-05T09:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588484#M43091</link>
      <description>&lt;P&gt;The result has to be independent from any date selection, I've tried this:&lt;/P&gt;&lt;P&gt;date(addmonths(MonthEnd(Today()),-12))&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;FONT color="#FF0000"&gt;it returns 30/06/2018&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Could be right?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 09:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588484#M43091</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2019-06-05T09:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588485#M43092</link>
      <description>&lt;P&gt;Independant of any selection?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if u select 04/03/2018 for example?&lt;/P&gt;&lt;P&gt;u don't want to it to return :&lt;/P&gt;&lt;P&gt;01/01/2017 to 31/03/2017?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if not use today, if u want to recalculate the limits, use max5date) as seen&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 09:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588485#M43092</guid>
      <dc:creator>OmarBenSalem</dc:creator>
      <dc:date>2019-06-05T09:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588491#M43093</link>
      <description>&lt;P&gt;YTD (YearToDate), MTD(MonthToDate) etc. have to be independent from any year, month, week and day selection.&lt;/P&gt;&lt;P&gt;They have always to start from the first day of the current year to the current day of the current year, comparing this year with the previous for the same range.&lt;/P&gt;&lt;P&gt;Example: YTD (from 01/01/2019 to 04/06/2019) - YTD Previous Year: (from 01/01/2018 to 04/06/2018).&lt;/P&gt;&lt;P&gt;But, in this case, my customer need to see the YTD of previous year not just until the current date of the previous year, but until the last day of the current month for the previous year.&lt;/P&gt;&lt;P&gt;More, he wants to see all the current month of the last year, always independently from any selection you could apply (another formula).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 09:27:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588491#M43093</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2019-06-05T09:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588498#M43094</link>
      <description>&lt;P&gt;More briefly, I need to implement:&lt;/P&gt;&lt;P&gt;YTD Previous Year, starting from the first day of the previous year &lt;STRONG&gt;until the last day of current month (previous year)&lt;/STRONG&gt;&amp;nbsp;; so: from 01/01/2018 to 30/06/2018)&lt;/P&gt;&lt;P&gt;MTD Previous year, all month: starting from 01/06/2018 to 30/06/2018&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 09:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588498#M43094</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2019-06-05T09:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588510#M43097</link>
      <description>&lt;P&gt;same as we did, juste replace max(Date) by today(1)&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 09:51:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588510#M43097</guid>
      <dc:creator>OmarBenSalem</dc:creator>
      <dc:date>2019-06-05T09:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588522#M43099</link>
      <description>&lt;P&gt;This seems work:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;date={"&amp;gt;=$(=date(YearStart(AddYears(Max(date),-1)),'YYYY-MM-DD'))&amp;lt;=$(=date(addmonths(MonthEnd(Today()),-12),'YYYY-MM-DD'))"}&amp;gt;}importo_netto)&lt;/P&gt;&lt;P&gt;Date starts from 01/01/2018 until 30/06/2018&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 10:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588522#M43099</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2019-06-05T10:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Previous YTD, until the end of current month</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588535#M43104</link>
      <description>&lt;P&gt;Thank you Omar&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;Alessandro&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 10:42:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-YTD-until-the-end-of-current-month/m-p/1588535#M43104</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2019-06-05T10:42:48Z</dc:date>
    </item>
  </channel>
</rss>

