<?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: Date Filter for previous month not working in Qlik NPrinting</title>
    <link>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2479614#M41987</link>
    <description>&lt;P&gt;Your date field is actually a time-stamp.&lt;/P&gt;
&lt;P&gt;I would suggest to build a calendar table, based only on the dates (not the times) in this field.&amp;nbsp;&lt;BR /&gt;You can make a 'real' date field by using &lt;BR /&gt;Date(Floor([TimestampfField])) as Date&lt;/P&gt;
&lt;P&gt;Then create a calendar table that references it. I personally like this one:&lt;BR /&gt;&lt;A href="https://qlikviewcookbook.com/2015/05/better-calendar-scripts/" target="_blank"&gt;https://qlikviewcookbook.com/2015/05/better-calendar-scripts/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;After you can use a Month or MonthNum or even a YYYYMM to reference the current and previous month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An alternative method, without using a Calendar table would be to add a field like this:&lt;BR /&gt;if(MonthName([Timestamp])&amp;nbsp; =&amp;nbsp; Monthname(AddMonths(Today(), -1)), 1, 0) as PreviousMonth.&lt;BR /&gt;All of the Timestamps in the previous month will have a 1 in this field.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 13:03:50 GMT</pubDate>
    <dc:creator>madelonjansen</dc:creator>
    <dc:date>2024-09-04T13:03:50Z</dc:date>
    <item>
      <title>Date Filter for previous month not working</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2479555#M41985</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been trying to create the filter to pull the previous month data only from the date field formatted like this :&amp;nbsp;2024-09-02 02:41:11.787 , but i am not winning i tried multiple solutions and getting errors, kindly assist on which logic/formula should i use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 08:39:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2479555#M41985</guid>
      <dc:creator>Thabang231</dc:creator>
      <dc:date>2024-09-04T08:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date Filter for previous month not working</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2479614#M41987</link>
      <description>&lt;P&gt;Your date field is actually a time-stamp.&lt;/P&gt;
&lt;P&gt;I would suggest to build a calendar table, based only on the dates (not the times) in this field.&amp;nbsp;&lt;BR /&gt;You can make a 'real' date field by using &lt;BR /&gt;Date(Floor([TimestampfField])) as Date&lt;/P&gt;
&lt;P&gt;Then create a calendar table that references it. I personally like this one:&lt;BR /&gt;&lt;A href="https://qlikviewcookbook.com/2015/05/better-calendar-scripts/" target="_blank"&gt;https://qlikviewcookbook.com/2015/05/better-calendar-scripts/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;After you can use a Month or MonthNum or even a YYYYMM to reference the current and previous month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An alternative method, without using a Calendar table would be to add a field like this:&lt;BR /&gt;if(MonthName([Timestamp])&amp;nbsp; =&amp;nbsp; Monthname(AddMonths(Today(), -1)), 1, 0) as PreviousMonth.&lt;BR /&gt;All of the Timestamps in the previous month will have a 1 in this field.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 13:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2479614#M41987</guid>
      <dc:creator>madelonjansen</dc:creator>
      <dc:date>2024-09-04T13:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date Filter for previous month not working</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2480220#M41998</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/197964"&gt;@Thabang231&lt;/a&gt; if the suggestion from&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6175"&gt;@madelonjansen&lt;/a&gt;&amp;nbsp;helped you please click on 'Accept as Solution'&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 17:38:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2480220#M41998</guid>
      <dc:creator>David_Friend</dc:creator>
      <dc:date>2024-09-06T17:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date Filter for previous month not working</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2480300#M42000</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/197964"&gt;@Thabang231&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6175"&gt;@madelonjansen&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58383"&gt;@David_Friend&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;Besides if you need more info read those:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/" target="_blank"&gt;https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://nprintingadventures.com/2022/03/19/filters-in-nprinting-how-hard-can-it-be-part-3-evaluate-value/" target="_blank"&gt;https://nprintingadventures.com/2022/03/19/filters-in-nprinting-how-hard-can-it-be-part-3-evaluate-value/&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;There are also existing topics on community which answer the same question:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://community.qlik.com/t5/Qlik-NPrinting/Filter-Previous-month-Nprinintg/td-p/1798789" target="_blank"&gt;https://community.qlik.com/t5/Qlik-NPrinting/Filter-Previous-month-Nprinintg/td-p/1798789&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Bottom line is that you need to understand:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;what data type of the field you are working with&lt;/LI&gt;
&lt;LI&gt;whether you are willing to use best practices and create typical date field or even proper calendar (!!! not autocalendar using derived fields!!!)&lt;/LI&gt;
&lt;LI&gt;depending on above you may be using "advanced search" or "evaluate value" NPrinting filter types as only those will work if used properly in this scenario.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2024 15:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Date-Filter-for-previous-month-not-working/m-p/2480300#M42000</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2024-09-08T15:04:45Z</dc:date>
    </item>
  </channel>
</rss>

