<?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: how to filter the date in Reporting Service &amp; Alerting</title>
    <link>https://community.qlik.com/t5/Reporting-Service-Alerting/how-to-filter-the-date/m-p/2494641#M1253</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/255119"&gt;@qlick_qa1&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;yes- you can use set analysis and the $ expansion in set analysis but much better practice is just to flag those last 28 days as a flag in load script and use the flag in set analysis:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;In load script:&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;If(yourdate&amp;gt;=Today()-28 and&amp;nbsp;yourdate&amp;lt;=Today(),1,0) as&amp;nbsp;fLast28Days&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;In chart expression:&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Sum({&amp;lt;fLast28Days={1}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That way you will avoid issues with date format in set analysis as well as the actual date refrence. We dont know your data, but if your date field allows for records from future your "Max(Date)" will not provide you correct date ranges for last 28 days - so consider that as well.&lt;/P&gt;
&lt;P&gt;cheers&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2024 10:59:28 GMT</pubDate>
    <dc:creator>Lech_Miszkiewicz</dc:creator>
    <dc:date>2024-11-26T10:59:28Z</dc:date>
    <item>
      <title>how to filter the date</title>
      <link>https://community.qlik.com/t5/Reporting-Service-Alerting/how-to-filter-the-date/m-p/2139339#M671</link>
      <description>&lt;P&gt;Hi, for a new line chart, i connected a database that has date dimention and&amp;nbsp; it is refreshing daily.&amp;nbsp; It covers past years till the day before. I want the line chart to show just the last 28 days. How can i filter the last 28 days ?&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:15:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Reporting-Service-Alerting/how-to-filter-the-date/m-p/2139339#M671</guid>
      <dc:creator>qlick_qa1</dc:creator>
      <dc:date>2024-11-15T21:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter the date</title>
      <link>https://community.qlik.com/t5/Reporting-Service-Alerting/how-to-filter-the-date/m-p/2141260#M682</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/255119"&gt;@qlick_qa1&lt;/a&gt;&amp;nbsp; Please use the below expression in the measure.&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Date={"&amp;gt;=$(=Date(Max(Date)-28,'MM/DD/YYYY'))&amp;lt;$(=Max(Date))"}&amp;gt;}Sales)&lt;/P&gt;
&lt;P&gt;If this resolves your issue please like and accept it as a solution.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Nov 2023 11:03:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Reporting-Service-Alerting/how-to-filter-the-date/m-p/2141260#M682</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2023-11-25T11:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter the date</title>
      <link>https://community.qlik.com/t5/Reporting-Service-Alerting/how-to-filter-the-date/m-p/2494641#M1253</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/255119"&gt;@qlick_qa1&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;yes- you can use set analysis and the $ expansion in set analysis but much better practice is just to flag those last 28 days as a flag in load script and use the flag in set analysis:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;In load script:&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;If(yourdate&amp;gt;=Today()-28 and&amp;nbsp;yourdate&amp;lt;=Today(),1,0) as&amp;nbsp;fLast28Days&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;In chart expression:&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Sum({&amp;lt;fLast28Days={1}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That way you will avoid issues with date format in set analysis as well as the actual date refrence. We dont know your data, but if your date field allows for records from future your "Max(Date)" will not provide you correct date ranges for last 28 days - so consider that as well.&lt;/P&gt;
&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 10:59:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Reporting-Service-Alerting/how-to-filter-the-date/m-p/2494641#M1253</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2024-11-26T10:59:28Z</dc:date>
    </item>
  </channel>
</rss>

