<?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 Date Range filters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Range-filters/m-p/2473314#M1225964</link>
    <description>&lt;P&gt;I initially tried achieving this through nested if, but it was not returning the desired results.&lt;/P&gt;
&lt;PRE&gt;=if(WhenDate&amp;gt;MakeDate(year(Today()),Month(addmonths(today(),-3)),day(today())),&lt;BR /&gt;&amp;nbsp; 'Past Three Months',&amp;nbsp;&lt;BR /&gt;&amp;nbsp; if(WhenDate&amp;gt;MakeDate(year(Today()),Month(addmonths(today(),-6)),day(today())),&lt;BR /&gt;&amp;nbsp; 'Past Six Months',&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if(WhenDate&amp;gt;MakeDate(year(Today()),Month(addmonths(today(),-12)),day(today())),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 'Past Year',&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(WhenDate&amp;lt;MakeDate(year(Today()),Month(addmonths(today(),-12)),day(today())),&lt;BR /&gt;&lt;SPAN&gt; 'Before a Year ago',&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; '')&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;I then saw a pick and match, but that doesn't work either.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;=Pick(&lt;BR /&gt;Match(WhenDate,'Three Months','Six Months','Year','Year Beyond'),&lt;BR /&gt;WhenDate&amp;lt;addmonths(today(),-3),&lt;BR /&gt;WhenDate&amp;lt;addmonths(today(),-6),&lt;BR /&gt;WhenDate&amp;lt;AddYears(today(),-1),&lt;BR /&gt;WhenDate&amp;gt;AddYears(today(),-1)&lt;BR /&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Any suggestions on how to get this in a filter pane would be great.&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2024 19:55:24 GMT</pubDate>
    <dc:creator>itcontracts</dc:creator>
    <dc:date>2024-07-26T19:55:24Z</dc:date>
    <item>
      <title>Date Range filters</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-filters/m-p/2473314#M1225964</link>
      <description>&lt;P&gt;I initially tried achieving this through nested if, but it was not returning the desired results.&lt;/P&gt;
&lt;PRE&gt;=if(WhenDate&amp;gt;MakeDate(year(Today()),Month(addmonths(today(),-3)),day(today())),&lt;BR /&gt;&amp;nbsp; 'Past Three Months',&amp;nbsp;&lt;BR /&gt;&amp;nbsp; if(WhenDate&amp;gt;MakeDate(year(Today()),Month(addmonths(today(),-6)),day(today())),&lt;BR /&gt;&amp;nbsp; 'Past Six Months',&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if(WhenDate&amp;gt;MakeDate(year(Today()),Month(addmonths(today(),-12)),day(today())),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 'Past Year',&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(WhenDate&amp;lt;MakeDate(year(Today()),Month(addmonths(today(),-12)),day(today())),&lt;BR /&gt;&lt;SPAN&gt; 'Before a Year ago',&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; '')&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;I then saw a pick and match, but that doesn't work either.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;=Pick(&lt;BR /&gt;Match(WhenDate,'Three Months','Six Months','Year','Year Beyond'),&lt;BR /&gt;WhenDate&amp;lt;addmonths(today(),-3),&lt;BR /&gt;WhenDate&amp;lt;addmonths(today(),-6),&lt;BR /&gt;WhenDate&amp;lt;AddYears(today(),-1),&lt;BR /&gt;WhenDate&amp;gt;AddYears(today(),-1)&lt;BR /&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Any suggestions on how to get this in a filter pane would be great.&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 19:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-filters/m-p/2473314#M1225964</guid>
      <dc:creator>itcontracts</dc:creator>
      <dc:date>2024-07-26T19:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range filters</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-filters/m-p/2473403#M1225965</link>
      <description>&lt;P&gt;How about this?&lt;/P&gt;
&lt;P&gt;If(WhenDate &amp;gt;= AddMonths(Today(), -3), 'Past Three Months',&lt;BR /&gt;If(WhenDate &amp;gt;= AddMonths(Today(), -6), 'Past Six Months',&lt;BR /&gt;If(WhenDate &amp;gt;= AddYears(Today(), -1), 'Past Year','Before a Year Ago'))) &lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2024 21:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-filters/m-p/2473403#M1225965</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2024-07-28T21:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range filters</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-filters/m-p/2473541#M1225967</link>
      <description>&lt;P&gt;Apologies for the overcomplicated code as it was a long day.&amp;nbsp; I initially convert to the addmonths/addyears after this post.&amp;nbsp; This solution worked.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 12:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-filters/m-p/2473541#M1225967</guid>
      <dc:creator>itcontracts</dc:creator>
      <dc:date>2024-07-29T12:32:06Z</dc:date>
    </item>
  </channel>
</rss>

