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.
Hi Team, We would like to raise an enhancement request for the SSO/SAML configuration guidance for OAS 2026. We have already raised multiple SRs regarding OAS 2026 SSO configuration. However, we are facing difficulties getting the required guidance, as the available documentation does not clearly cover the OAS 2026 SSO…
We are planning to archive the Contract and Lease data currently sourced from the External Source as Contract and Lease accounting functions are being migrated to Oracle's CLM and Lease Accounting modules. At this stage, only active and partially closed records are being converted into Oracle and the remaining historical…
The difference column is a calculation, and I would like to average that row.
We are trying to convert our OAS reports to OAC and one of the parameters in the where clause of the report is what I am trying to make in OAC. I created a calculation as follows and I am trying to put it into a filter . The code validates EVALUATE('GREATEST ( TRUNC ( NVL (%1, TO_DATE (''1/1/2013'', ''mm/dd/yyyy'') ) ),…
Hi , I am calling one parameter in another parameter and it is not working. 1st parameter is showing values, while calling the 1st parameter in second it is not showing any values. Regards, Sree Hari M