Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 44 Oracle Analytics and AI Sharing Center
- 20 Oracle Analytics and AI Lounge
- 278 Oracle Analytics and AI News
- 56 Oracle Analytics and AI Videos
- 16.2K Oracle Analytics and AI Forums
- 6.4K Oracle Analytics and AI Labs
- Oracle Analytics and AI User Groups
- 103 Oracle Analytics and AI Trainings
- 20 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
Presentation variables in the between prompt
Hi Gurus,
I have a prompt which values between two dates as shown in the attachment. Is there any way to just capture only one date in the presentation variable ?
For ex : User chooses 04/01/2018 to 04/24/2018. I just want to capture 04/24/2018 and use it to populate calculated field.
Thnaks
Venkat
Answers
-
The presentation variable that the prompt creates will store the dates like 04-01-2018,04-24-2018 (dates are separated by column)
You can get the second date like this: SUBSTRING('@{pVar}' FROM POSITION(',' IN '@{pVar}')+1 )
Date format in the presentation variable string can vary based on your NLS settings
0 -
Your other option is to create two dashboard prompts one for the from, the other for the two, populating presentation variables and then filtering based on these with two separate filters, or one sql based file, in your analysis.
0 -
Something similar to the following will also work (where p_test = the name of your variable).
SUBSTRING('@{p_test}{01/01/1900}' FROM LOCATE(',', '@{p_test}{01/01/1900}')+1 FOR LENGTH('@{p_test}{01/01/1900}')-LOCATE(',', '@{p_test}{01/01/1900}'))
Martin's method is by far the cleanest though.0