my report runs on the 20th of the month but I need it to pull the last months data how would that formula look like?
You haven't given much information here, but I'll do my best to help.
Say you are using a TRANSACTION_DATE to drive the date dimension in your report...
And assuming your report is running on the 20th of every month...
If that report were to run on November 20th, 2017, you could use the following filter on your report:
Where TRANSACTION_DATE = TIMESTAMPADD(SQL_TSI_MONTH, -1, current_date)
To explain a little more --
"TIMESTAMPADD(SQL_TSI_MONTH, -1, current_date)" will always return the date 1 month previous to today's date. So if run it on 11/20/2017, it will return 10/20/2017.
I hope this helps.
Months: 4 weeks running? 30 days running? last calendar month? last fiscal month?
It will be really nice if you can post an example of your requirement.
@Chris, As far as I understand, your solution will fetch the records for that particular date only.
Instead, we can extract the month and Year using TIMESTAMP function to get the previous month using the SYSDATE.
As the OP doesn't really formulate in question in a way to give him a unique answer, all the above are valid answers. It all depends on the granularity of the OP data and what model he adopted (even monthly figures can be attached to a single day which can be the first of the month, the last etc.).
Chris Arnold pointed the OP in the right direction on the function solving most of his problem, of course the OP now need to put some effort in thinking at how to use the TIMESTAMPADD function correctly for his needs.
Dear Oracle Support Team, I need assistance uninstalling Oracle AI Database 26ai Free from my Windows 11 Home laptop. System configuration Operating System: Windows 11 Home Processor: Intel Core i5 RAM: 8 GB Oracle Product: Oracle AI Database 26ai Free Product Version: 23.0.0.0 Installer:…
Hello Oracle Analytics Community, We are investigating a dashboard compatibility issue between Oracle Analytics Server (OAS) 7.6 and OAS 7.0. Some dashboards originally created in Oracle BI 12c can be opened in OAS 7.6 but fail to open after being archived and imported into OAS 7.0. During our investigation, we found the…
Hi all, We’re running into an issue with an on-premises Oracle Analytics Server 2026 integrated with Active Directory and hoping someone has seen this or knows if a patch is available. Environment: Oracle Analytics Server 2026 (on-premises) WebLogic 14.1.2.0.0, JDK 21, Oracle Linux DB-backed catalog (Oracle DB, BIPLATFORM…
We have a requirement Creating a Bar graph using Cost Center Tree hierarchy as prompt/filter. Created a Bar Graph using Cost Center Tree Hierarchy as a prompt. When I'm selecting values through selection steps from Cost Center Tree Hierarchy, the Bar Graph not refreshing as the selected values are not passing to Graph…
I have 2 tabs on the workbook that use the same dataset. I would rather not use 2 different datasets. Can I code an expression filter or something to remove those records?