Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 211 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 77 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
passing presentation variable - date field error

Hi All,
could anyone please provide some suggestion - I have a field in the RPD which is based on the to_date and it is to get the last day of the month
1)OPV Field - LAST_DAY(TO_DATE(TO_CHAR(TO_DATE(A.REC_CALNDR_PRD,'YYYYMMDD'),'MM/DD/YYYY'),'MM/DD/YYYY')) AS MONTH_ENDING
2). From the Answers it looks like below without any format in the column properties data format
3). For testing I create the prompt in answers with a presentation variable - and I choose choice list - so the values in it looks like
4). when I specify the filter using presentation variable - Month Ending is equal to / is in @{vtest} - This is working when I open the answers but when I look at the results it is giving an error "date value was expected"
when we look at the results in answers it should not give me an error - right? it should specify the message or custom message like no results etc
I think I am missing something here - thanks a lot for yur time
Rj
Answers
-
What do you mean by exactly by this: "This is working when I open the answers but when I look at the results it is giving an error "date value was expected"" ?
It's normal that you can only see result for your analysis when you have it in a dashboard with the dashboard prompt that sets your presentation variable @{vtest}. If you want to see results inside your analysis, you need to set up a default variable for your variable, something like "Month Ending is equal to / is in @{vtest}{01/31/2017}.
Is that your issue or it doesn't work at all?
0 -
when I open the answers - that is when I click on open and when I select a value it is ok - but within the answers when I click on "results" tab it is giving me an error
when I use a presentation variable it will generally say no data returned something like that - but not a error message - right?
thanks for your time, It's been a while I used answers - really appreciate your time
Rj
0 -
No, the error you're getting it's normal. The filter is expecting to receive a date value and instead is getting the value 'vTest'. Like I said, in the screenshot that you put there where you set the filter, fill in the box for (default) (just below the one where you put the variable name) and the variable will assume that value as the default one and won't produce the error you see now.
0 -
Hi,
In Answer, if you want to test the result, then just update the default column with any date value and try. It will not give any error.
0 -
You can also default in the current date or create a repository variable that you can then default to in your prompt.
0 -
In addition to your other issues ... you are burdening the OPV (which is not a performance approach in itself) ...
1)OPV Field - LAST_DAY(TO_DATE(TO_CHAR(TO_DATE(A.REC_CALNDR_PRD,'YYYYMMDD'),'MM/DD/YYYY'),'MM/DD/YYYY')) AS MONTH_ENDING
You don't need half the functions...
LAST_DAY(TO_DATE(A.REC_CALNDR_PRD,'YYYYMMDD')) AS MONTH_ENDING
0