<?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: Range of dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506800#M104239</link>
    <description>&lt;P&gt;Ensure that the dates are formatted consistently to match the format of your [BY_DATES] field.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2025 13:52:06 GMT</pubDate>
    <dc:creator>BrunPierre</dc:creator>
    <dc:date>2025-02-20T13:52:06Z</dc:date>
    <item>
      <title>Range of dates</title>
      <link>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506797#M104238</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I have a syntaxis problem which I cannot figure out how to deal with. I need an expression that sums the values for a range starting 2 days earlier than the same month in the previous year, and ending 2 days earlier than today in the previous year.&lt;/P&gt;
&lt;P&gt;My expression looks like this:&lt;BR /&gt;&lt;BR /&gt;Sum({&amp;lt;[BY_DATES] = {&amp;gt;=$(=Date(AddYears(MakeDate(Year(Today()), Month(Today()), 1),-1)-2)) &amp;lt;=$(=Date(AddYears(Max([BY_DATES]), -1) - 2))}&amp;gt;} [SALES])&lt;/P&gt;
&lt;P&gt;A range is defined correctly, but there is something I still missing....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 13:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506797#M104238</guid>
      <dc:creator>Mihail_RIX</dc:creator>
      <dc:date>2025-02-20T13:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Range of dates</title>
      <link>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506800#M104239</link>
      <description>&lt;P&gt;Ensure that the dates are formatted consistently to match the format of your [BY_DATES] field.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 13:52:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506800#M104239</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2025-02-20T13:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Range of dates</title>
      <link>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506805#M104242</link>
      <description>&lt;P&gt;They are correct. ''Edit expression" has recognized it&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 14:11:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506805#M104242</guid>
      <dc:creator>Mihail_RIX</dc:creator>
      <dc:date>2025-02-20T14:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Range of dates</title>
      <link>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506831#M104253</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;BY_DATES = {"&amp;gt;=$(=Date(AddYears(MakeDate(Year(Today()), Month(Today()), 1), -1) - 2, 'YYYY-MM-DD')) &amp;lt;=$(=Date(AddYears(Today(), -1) - 2, 'YYYY-MM-DD'))"}&amp;gt;} SALES)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 18:11:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506831#M104253</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2025-02-20T18:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Range of dates</title>
      <link>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506878#M104259</link>
      <description>&lt;P&gt;You may try:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;[BY_DATES] = &lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;STRONG&gt;"&lt;/STRONG&gt;&amp;gt;=$(=monthstart(Today(), -12) -2)&amp;lt;=$(=AddYears(Max([BY_DATES]), -1) - 2)&lt;STRONG&gt;"&lt;/STRONG&gt;}&amp;gt;} &lt;BR /&gt;[SALES])&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Important is that&amp;nbsp;&lt;SPAN&gt;[BY_DATES] is a numeric date and not a timestamp (will in general be working but may return unexpected results) or even a string and that the condition is wrapped with double-quotes to be recognized as a search. Further by a &amp;gt;= &amp;lt;= comparing a numerical comparison is applied which means no format-interpretations is needed and the date-stuff could be skipped.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 07:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Range-of-dates/m-p/2506878#M104259</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-02-21T07:23:46Z</dc:date>
    </item>
  </channel>
</rss>

