Categories
- All Categories
- 75 Oracle Analytics News
- 7 Oracle Analytics Videos
- 14K Oracle Analytics Forums
- 5.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 40 Oracle Analytics Trainings
- 59 Oracle Analytics Data Visualizations
- 2 Oracle Analytics Data Visualizations Challenge
- 3 Oracle Analytics Career
- 4 Oracle Analytics Industry
- Find Partners
- For Partners
BI Published Report Date Variables
Summary
Date variable for previous month
Content
Hello,
I was on this site: https://docs.oracle.com/middleware/12212/bip/BIPUG/GUID-BC0A8B60-1BB5-4D85-85BB-B199C1A5C418.htm#BIPUG219
I am looking for a variable for the previous month. something like {$PREVIOUS_MONTH()$}. Does that exist?
Thanks,
Stephanie
Version
12.2.1.2.0
Comments
-
Hi,
If you are using RTF templates you have a lot of options. I can suggest you to take a look at https://blogs.oracle.com/xmlpublisher/date-functions for this.
0 -
Hello,
Thank you for your response. We use XSL stylesheet as the RTF limits the amount of columns we can display to our users. Having said that though, what I'm trying to do is set the default in the prompt to be 'previous month'. So in the parameters section of the data model, we've used the '{$SYSDATE()$} variables but I can't find for previous month. Hope this helps clarify.
Thanks,
Stephanie
0 -
Hi Stephanie
We just have the following variables available to default the date in parameters
{$SYSDATE()$} - current date, the system date of the server on which BI Publisher is running.
{$FIRST_DAY_OF_MONTH()$} - first day of the current month
{$LAST_DAY_OF_MONTH()$} - last day of the current month
{$FIRST_DAY_OF_YEAR)$} - first day of the current year
{$LAST_DAY_OF_YEAR)$} - last day of the current year
So can play with these variables to achieve your requirement as there is no such variable that will help you to directly get the previous month.
The other option is to default the sysdate and use the logic in the Data Model SQL to obtain the data for previous month.
Regards,
Sahil
0