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.
Explore how to build agents using code in AI Data Platform. We'll create an agent that examines and analyzes the contents of a Github repository and reports its findings. The session demonstrates how to use different developer tools to create agents including the AIDP extension for VS Code and Codex. Using these tools we…
The user icon in the upper-right corner of OAC (DV) is displaying more menu options for our non-admin users than we wish to display. We would like to restrict these to only "Profile" and "Sign Out" for regular users. Is there a way to customize these menu items? Especially if we can control this via security, that would be…
What is wrong with this code
Am I missing something or is there no way to search through previous posts to make sure I don't duplicate a question? All I see on the filter options are tags or status… a general search for a word or phrase would be helpful.
We were under the impression that when exporting a visualization in DV to CSV format hidden columns would be include from the grammar panel. This is not happening. See below for a screenshot showing 3 hidden columns that do not appear when exporting the pivot table to CSV. This seems to have worked a month or so back but…
Migrated RPD from obiee12c to OAS 2024. post migration when we try to access dashboards on OAS we are getting below error: State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. (HY000) State: HY000. Code: 43275. [nQSError: 43275] Message returned from OBIS…