<?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>article From Date &amp;amp; To Date individual date selection script approach in Member Articles</title>
    <link>https://community.qlik.com/t5/Member-Articles/From-Date-amp-To-Date-individual-date-selection-script-approach/ta-p/1479498</link>
    <description>&lt;P&gt;Date range selections are a common feature in any BI dashboard, and there are several ways to implement this functionality. Below are a few options:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 1:&lt;/STRONG&gt; Create two data island tables (From Date &amp;amp; To Date). Users can select the From and To dates from these tables, and the selected values can be stored in variables (vFromDate, vToDate). These variables can then be used in set analysis to produce the desired output.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 2:&lt;/STRONG&gt; Create From Date and To Date tables within the data model, associating them with the Fact table.&lt;/P&gt;
&lt;P&gt;There are other approaches to achieve this scenario as well.&lt;/P&gt;
&lt;P&gt;While Option 1 is easy to implement, it may lead to performance issues with large datasets due to the use of data island tables.&lt;/P&gt;
&lt;P&gt;I will demonstrate Option 2, which utilizes an associative model through a script-based solution. In this approach, date range selections populate all the dates within the selected range and associate them with the source/fact table. The advantage of this method is that it leverages Qlik’s associative model, eliminating the need for complex expressions.&lt;/P&gt;
&lt;P&gt;Below is a screenshot of the model&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-23 124625.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41054iC8F01C4D4EDB7BAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-23 124625.png" alt="Screenshot 2020-09-23 124625.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/legacyfs/online/153639_pastedImage_4.png" target="_blank" rel="noopener"&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/153639_pastedImage_4.png" border="0" alt="" width="972" height="331" /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-23 125000.png" style="width: 855px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41055i7C0D1750D2F2D5CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-23 125000.png" alt="Screenshot 2020-09-23 125000.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Added FromWeek-ToWeek and FromMonth-ToMonth functionality&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Added qvf file&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Feel free to provide any suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kushal Chawda&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 18:08:28 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2024-09-25T18:08:28Z</dc:date>
    <item>
      <title>From Date &amp; To Date individual date selection script approach</title>
      <link>https://community.qlik.com/t5/Member-Articles/From-Date-amp-To-Date-individual-date-selection-script-approach/ta-p/1479498</link>
      <description>&lt;P&gt;Date range selections are a common feature in any BI dashboard, and there are several ways to implement this functionality. Below are a few options:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 1:&lt;/STRONG&gt; Create two data island tables (From Date &amp;amp; To Date). Users can select the From and To dates from these tables, and the selected values can be stored in variables (vFromDate, vToDate). These variables can then be used in set analysis to produce the desired output.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 2:&lt;/STRONG&gt; Create From Date and To Date tables within the data model, associating them with the Fact table.&lt;/P&gt;
&lt;P&gt;There are other approaches to achieve this scenario as well.&lt;/P&gt;
&lt;P&gt;While Option 1 is easy to implement, it may lead to performance issues with large datasets due to the use of data island tables.&lt;/P&gt;
&lt;P&gt;I will demonstrate Option 2, which utilizes an associative model through a script-based solution. In this approach, date range selections populate all the dates within the selected range and associate them with the source/fact table. The advantage of this method is that it leverages Qlik’s associative model, eliminating the need for complex expressions.&lt;/P&gt;
&lt;P&gt;Below is a screenshot of the model&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-23 124625.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41054iC8F01C4D4EDB7BAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-23 124625.png" alt="Screenshot 2020-09-23 124625.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/legacyfs/online/153639_pastedImage_4.png" target="_blank" rel="noopener"&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/153639_pastedImage_4.png" border="0" alt="" width="972" height="331" /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-23 125000.png" style="width: 855px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41055i7C0D1750D2F2D5CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-23 125000.png" alt="Screenshot 2020-09-23 125000.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Added FromWeek-ToWeek and FromMonth-ToMonth functionality&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Added qvf file&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Feel free to provide any suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kushal Chawda&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 18:08:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/From-Date-amp-To-Date-individual-date-selection-script-approach/ta-p/1479498</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-09-25T18:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: From Date &amp; To Date Selection Script Solution</title>
      <link>https://community.qlik.com/t5/Member-Articles/From-Date-amp-To-Date-individual-date-selection-script-approach/tac-p/1479499#M1479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simple and Elegant solution vs Going with Option 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2017 14:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/From-Date-amp-To-Date-individual-date-selection-script-approach/tac-p/1479499#M1479</guid>
      <dc:creator>b_garside</dc:creator>
      <dc:date>2017-06-17T14:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: From Date &amp; To Date Selection Script Solution</title>
      <link>https://community.qlik.com/t5/Member-Articles/From-Date-amp-To-Date-individual-date-selection-script-approach/tac-p/1479500#M1480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kushal,&lt;/P&gt;&lt;P&gt;Good and informative blog.&lt;/P&gt;&lt;P&gt;- If you can add some technique so that Start date must not be more than End date and vise versa.&lt;/P&gt;&lt;P&gt;This can be achieved through field trigger but, is there any better approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for Sharing,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Pankaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2017 16:18:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/From-Date-amp-To-Date-individual-date-selection-script-approach/tac-p/1479500#M1480</guid>
      <dc:creator>passionate</dc:creator>
      <dc:date>2017-06-17T16:18:36Z</dc:date>
    </item>
  </channel>
</rss>

