<?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>Question Re: Rolling Date Filter in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794602#M4803797</link>
    <description>&lt;P&gt;Both of  &lt;SPAN class="mention-scrubbed"&gt;amit.kumar71&lt;/SPAN&gt;'s answers will work. However, the variable method will result in returning more data than necessary which could perform poorly depending on how large the table is from which you are querying data. Now you could arbitrarily have a query filter to hard code a date three years ago in addition to the variable. Initially that would perform fine, but performance would degrade over time.&lt;/P&gt;&lt;P&gt;Another option would be to create a free-hand SQL query as follows...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT add_months( trunc(sysdate),-36) as "TodayMinus3Years"&amp;lt;br&amp;gt;FROM dual&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can then use that value in the query filter of your main query&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213025-image.png" /&gt;&lt;/P&gt;&lt;P&gt;If you do not have permission to create a free-hand SQL query maybe you could create universe query with a singular object with Date Time data type and then drop the select statement from above in as custom query script.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213026-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Noel&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2023 14:19:20 GMT</pubDate>
    <dc:creator>nscheaffer</dc:creator>
    <dc:date>2023-09-21T14:19:20Z</dc:date>
    <item>
      <title>Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaq-p/12794595</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;I want to apply rolling last 3 years data filter in my report. I have gone through the available threads and tried to implement it but not able to get the expected result.&lt;/P&gt;
  &lt;P&gt;I have to rolling filter data from current date to last 3 yrs data. Can somebody please help me with this?&lt;/P&gt;
  &lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 06:03:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaq-p/12794595</guid>
      <dc:creator>matix10</dc:creator>
      <dc:date>2023-09-21T06:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794596#M4803791</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;amit.kumar71&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;Could you please help me with this ?&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 06:05:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794596#M4803791</guid>
      <dc:creator>matix10</dc:creator>
      <dc:date>2023-09-21T06:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794597#M4803792</link>
      <description>&lt;P&gt;what is the backend database?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 08:37:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794597#M4803792</guid>
      <dc:creator>amitrathi239</dc:creator>
      <dc:date>2023-09-21T08:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794598#M4803793</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;amit.kumar71&lt;/SPAN&gt; , It is oracle database&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 08:45:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794598#M4803793</guid>
      <dc:creator>matix10</dc:creator>
      <dc:date>2023-09-21T08:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794599#M4803794</link>
      <description>&lt;P&gt;You can do through creating 3year back date object in the universe.&lt;/P&gt;&lt;P&gt;After that add the webi filter where Date object is between 3year back date and sys date object.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt; add_months( trunc(sysdate),-36)&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 08:58:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794599#M4803794</guid>
      <dc:creator>amitrathi239</dc:creator>
      <dc:date>2023-09-21T08:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794600#M4803795</link>
      <description>&lt;P&gt;I am not supposed to do anything in UDT. I need these changes to done at Webi level only.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 09:03:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794600#M4803795</guid>
      <dc:creator>matix10</dc:creator>
      <dc:date>2023-09-21T09:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794601#M4803796</link>
      <description>&lt;P&gt;Create variable like 3Yr back date=RelativeDate(CurrentDate();-3;YearPeriod)&lt;/P&gt;&lt;P&gt;Final variable=If ([your date object] between ([3Yr back date];currentdate()) then "Show" else "Hide"&lt;/P&gt;&lt;P&gt;Apply the filter at Table where equal t Show&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 09:08:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794601#M4803796</guid>
      <dc:creator>amitrathi239</dc:creator>
      <dc:date>2023-09-21T09:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794602#M4803797</link>
      <description>&lt;P&gt;Both of  &lt;SPAN class="mention-scrubbed"&gt;amit.kumar71&lt;/SPAN&gt;'s answers will work. However, the variable method will result in returning more data than necessary which could perform poorly depending on how large the table is from which you are querying data. Now you could arbitrarily have a query filter to hard code a date three years ago in addition to the variable. Initially that would perform fine, but performance would degrade over time.&lt;/P&gt;&lt;P&gt;Another option would be to create a free-hand SQL query as follows...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT add_months( trunc(sysdate),-36) as "TodayMinus3Years"&amp;lt;br&amp;gt;FROM dual&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can then use that value in the query filter of your main query&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213025-image.png" /&gt;&lt;/P&gt;&lt;P&gt;If you do not have permission to create a free-hand SQL query maybe you could create universe query with a singular object with Date Time data type and then drop the select statement from above in as custom query script.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213026-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Noel&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 14:19:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794602#M4803797</guid>
      <dc:creator>nscheaffer</dc:creator>
      <dc:date>2023-09-21T14:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794603#M4803798</link>
      <description>&lt;P&gt;Hello Bhagya,&lt;/P&gt;&lt;P&gt;Also please check the below blog:&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2018/11/18/web-intelligence-dynamic-date-filter-with-relative-values-prompt/" target="test_blank"&gt;https://blogs.sap.com/2018/11/18/web-intelligence-dynamic-date-filter-with-relative-values-prompt/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 17:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794603#M4803798</guid>
      <dc:creator>vishalakshmi</dc:creator>
      <dc:date>2023-09-21T17:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794604#M4803799</link>
      <description>&lt;P&gt;Thank you  &lt;SPAN class="mention-scrubbed"&gt;amit.kumar71&lt;/SPAN&gt; for your help as always! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794604#M4803799</guid>
      <dc:creator>matix10</dc:creator>
      <dc:date>2023-09-22T12:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794605#M4803800</link>
      <description>&lt;P&gt;Hi Noel, Thank you so much for this valuable input!&lt;/P&gt;&lt;P&gt;Will try with this as well! Thanks much again! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:26:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794605#M4803800</guid>
      <dc:creator>matix10</dc:creator>
      <dc:date>2023-09-22T12:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794606#M4803801</link>
      <description>&lt;P&gt;Hi Lakshmi, Thanks a lot, will go through this blog!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:26:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794606#M4803801</guid>
      <dc:creator>matix10</dc:creator>
      <dc:date>2023-09-22T12:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Date Filter</title>
      <link>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794607#M4803802</link>
      <description>&lt;P&gt;Hello Bhagya,&lt;/P&gt;&lt;P&gt;Can you please up-vote if my answer is helpful to you.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 20:23:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rolling-date-filter/qaa-p/12794607#M4803802</guid>
      <dc:creator>vishalakshmi</dc:creator>
      <dc:date>2023-09-22T20:23:37Z</dc:date>
    </item>
  </channel>
</rss>

