Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 214 Oracle Analytics News
- 42 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 78 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Previous Year Values using Date Between dashboard prompt

Hi,
There is Date dashboard prompt, where " is Between" is the operator for this date dashboard prompt.
Can you please let me know how to display the previous year values in a simple report.
Thanks in Advance
Ajith
Answers
-
Ajith,
could you please elaborate a bit on what are trying to do?
Do you want to know how to filter the report through a dashboard prompt showing the previous year data?
Why the "is between" than? Is only to specify Month or day+month and the year is always the previous year?
A couple of details or a screenshot would help to make a dedicated suggestion.
Ciao
MP
0 -
Hi Marco,
Thank you for your response.
1). Through Date Dashboard prompt, while using the is "Between' Operator in the prompt. I will get it in below format as single column
2). Now I have separated this single column in to 2 separate columns by using the SUBSTRING, which is like below:
Date 1 Edit Column Formula: Evaluate('TO_CHAR(TO_DATE(%1,%2),%3)'AS CHAR ,SUBSTRING('@{PBFROMTO}' FROM 1 FOR 10),'YYYY-MM-DD','MM/DD/YYYY')
Date 2 Edit Column Formula: Evaluate('TO_CHAR(TO_DATE(%1,%2),%3)'AS CHAR ,SUBSTRING('@{PBFROMTO}' FROM 12 FOR 20),'YYYY-MM-DD','MM/DD/YYYY')
3)Based on this Date 1 & Date 2 separate columns, I need to display the previous year date values
For achieving the previous year date values, I have written the below code in the separate columns (Date 3 & Date 4) to display previous year date values
Date 3 Edit Column Formula:
Evaluate('TO_CHAR(%1)' AS CHAR ,TIMESTAMPADD(SQL_TSI_YEAR,-1,
Evaluate('TO_CHAR(TO_DATE(%1,%2),%3)'AS CHAR , SUBSTRING('@{PBFROMTO}' FROM 1 FOR 10),'YYYY-MM-DD','MM/DD/YYYY')))
Date 4 Edit Column Formula:
Evaluate('TO_CHAR(%1)' AS CHAR ,TIMESTAMPADD(SQL_TSI_YEAR,-1,
Evaluate('TO_CHAR(TO_DATE(%1,%2),%3)'AS CHAR , SUBSTRING('@{PBFROMTO}' FROM 12 FOR 20),'YYYY-MM-DD','MM/DD/YYYY')))
I am getting the below error, when i place the Date 3 column in the criteria:
Not a valid month at OCI
Your help is highly appreciated.
Thanks in Advance
Ajith
0