<?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 Selecting a date range based on another selection in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Selecting-a-date-range-based-on-another-selection/m-p/1945026#M77883</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I would like to get a range of dates selected (from a certain datefield in the data model) when some other selection is done in a filter pane.&lt;/P&gt;
&lt;P&gt;For example filter pane has "Last 6 Months" and when selected this will go ahead and dynamically apply a filter to CalDate column something like CalDate &amp;gt;= 17/12/2021 and CalDate &amp;lt;= 17/06/2022 (in DD/MM/YYYY format)&lt;/P&gt;
&lt;P&gt;How would you do this? The selection in the filter pane will be minimum like 2-3 of them, which will be via an Inline Table from script. They will be last 6, 9 and 12 months. I can write an (nested) If clause, if necessary.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Bilal&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 11:42:33 GMT</pubDate>
    <dc:creator>bilalgunay</dc:creator>
    <dc:date>2022-06-17T11:42:33Z</dc:date>
    <item>
      <title>Selecting a date range based on another selection</title>
      <link>https://community.qlik.com/t5/App-Development/Selecting-a-date-range-based-on-another-selection/m-p/1945026#M77883</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I would like to get a range of dates selected (from a certain datefield in the data model) when some other selection is done in a filter pane.&lt;/P&gt;
&lt;P&gt;For example filter pane has "Last 6 Months" and when selected this will go ahead and dynamically apply a filter to CalDate column something like CalDate &amp;gt;= 17/12/2021 and CalDate &amp;lt;= 17/06/2022 (in DD/MM/YYYY format)&lt;/P&gt;
&lt;P&gt;How would you do this? The selection in the filter pane will be minimum like 2-3 of them, which will be via an Inline Table from script. They will be last 6, 9 and 12 months. I can write an (nested) If clause, if necessary.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Bilal&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 11:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Selecting-a-date-range-based-on-another-selection/m-p/1945026#M77883</guid>
      <dc:creator>bilalgunay</dc:creator>
      <dc:date>2022-06-17T11:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting a date range based on another selection</title>
      <link>https://community.qlik.com/t5/App-Development/Selecting-a-date-range-based-on-another-selection/m-p/1945192#M77895</link>
      <description>&lt;P&gt;Hi, you can add a field the the filters table to add a number with the months, and use this number in set analysis, to filter CalDate it could be:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;&lt;SPAN&gt;CalDate={"&amp;gt;=$(=AddMonths(Max(CalDate),-$(=NumMonthsFieldName)))&amp;lt;=$(=Max(CalDate))"}&lt;/SPAN&gt;&amp;gt;} Sales)&lt;/P&gt;
&lt;P&gt;Maybe needs some adjustments to add date format or in there are more than one filter selected&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 18:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Selecting-a-date-range-based-on-another-selection/m-p/1945192#M77895</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-06-17T18:23:35Z</dc:date>
    </item>
  </channel>
</rss>

