<?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: Showing Last 36 months of data based on current Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653492#M730460</link>
    <description>&lt;P&gt;Hi, The above reply is absolutely perfect !!&amp;nbsp;but there is another solution which you can look after !!&lt;/P&gt;&lt;P&gt;You can have a variable as App_start_date&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let App_start_date= Date(num(MonthStart(AddMonths(today(),-36))),'YYYY-MM-DD');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Transaction:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * from Transaction_table where Date &amp;gt;= $(App_start_date);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//&amp;nbsp;&lt;/STRONG&gt;This will load the data only greater and equal to that app start date !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;both gives the absolute form of loading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 09:26:57 GMT</pubDate>
    <dc:creator>Anismohamed32</dc:creator>
    <dc:date>2019-12-03T09:26:57Z</dc:date>
    <item>
      <title>Showing Last 36 months of data based on current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1652729#M730458</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a Date field in my data model having YYYY-MM-DD format.&lt;/P&gt;&lt;P&gt;The requirement is to load the last 36 months of data based on the Today's date in the original table in the data model.&lt;/P&gt;&lt;P&gt;Could you please suggest how to move ahead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1652729#M730458</guid>
      <dc:creator>kishorj1982</dc:creator>
      <dc:date>2024-11-16T01:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Last 36 months of data based on current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653027#M730459</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i would go like this.&lt;/P&gt;&lt;P&gt;1) Load a table with all needed dates in your desired format&lt;/P&gt;&lt;P&gt;2) Load fact table with where exists(DATE)&lt;/P&gt;&lt;P&gt;3) drop table from 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LET vToday = num(today());
LET vMinDate = num(MonthStart(AddMonths(today(),-36)));

Reduce_Data:
LOAD date($(vMinDate)+ rowno()-1) AS DATE
AUTOGENERATE $(vToday)-$(vMinDate)+1;

Fact_Table:
Load *
from YOUR_ORGINAL_TABLE
where exists(DATE);

drop table Reduce_Data;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;tim&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 10:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653027#M730459</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-02T10:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Last 36 months of data based on current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653492#M730460</link>
      <description>&lt;P&gt;Hi, The above reply is absolutely perfect !!&amp;nbsp;but there is another solution which you can look after !!&lt;/P&gt;&lt;P&gt;You can have a variable as App_start_date&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let App_start_date= Date(num(MonthStart(AddMonths(today(),-36))),'YYYY-MM-DD');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Transaction:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * from Transaction_table where Date &amp;gt;= $(App_start_date);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//&amp;nbsp;&lt;/STRONG&gt;This will load the data only greater and equal to that app start date !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;both gives the absolute form of loading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 09:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653492#M730460</guid>
      <dc:creator>Anismohamed32</dc:creator>
      <dc:date>2019-12-03T09:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Last 36 months of data based on current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653494#M730461</link>
      <description>&lt;P&gt;yes you are right. But note that you loose the "optimized load" in your example.&lt;/P&gt;&lt;P&gt;thats why i did it with where exists()&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;tim&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 09:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653494#M730461</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-03T09:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Last 36 months of data based on current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653497#M730462</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;yes , you are right !! best way is to have where exists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a person wish to create a master calendar , where exists is optimized solution&amp;nbsp;&lt;/P&gt;&lt;P&gt;Variable is one another solution which may help when u load from many tables in the loaders.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glad to connect with you !!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 09:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1653497#M730462</guid>
      <dc:creator>Anismohamed32</dc:creator>
      <dc:date>2019-12-03T09:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Last 36 months of data based on current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1656278#M730463</link>
      <description>&lt;P&gt;If Tim's post got your solution working, be sure to return to the post and use the Accept as Solution button on his post to give him credit for the assistance and to let other Community Members know it worked for you.&amp;nbsp; If you are still working on things, leave an update on what you need.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 20:46:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-Last-36-months-of-data-based-on-current-Date/m-p/1656278#M730463</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-10T20:46:49Z</dc:date>
    </item>
  </channel>
</rss>

