Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 15 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
Use Expression as Default for "Normal" String Filter

I would like to have the default value in a filter be based on an expression while still being able to use the selectable values from a normal string filter. To explain in more detail…
The Expression
We want to get the current accounting period as of one day ago as the default value for Fiscal Period (e.g., 2/1/2025 would be for the 1/31/2025 accounting period). We use the "Jan-25" format. As such, we use the following expression which yields a valid filter value for Fiscal Period.
MONTHNAME(CURRENT_DATE- 1)|| '-' || RIGHT(CAST(YEAR(CURRENT_DATE - 1) AS CHAR(4)), 2)
The Challenge
This filter works, but the user sees the full expression code when they click the filter rather than the available accounting periods (Jan-25, Feb-25, etc.)
We can use the default filter by drag and dropping, which displays the available periods. However, there does not appear to be a way to have it default based on the expression above as the "default" value must be selected from the available values (e.g. I can choose Feb-25 from the list, but I can't input an expression to arrive at Feb-25)
The Use Case
95% of the time users want to default to the current period minus a day so we want this as a default. We then want them to be able to override that as needed easily by clicking a different date rather than having to play in the expression filter.
Is there a way to accomplish the above, or not current possible? Thanks!
Best Answer
-
Please perform below:
- Add fiscal period to the filters.
- Click the filter -> Click on (X) and click on Create Parameter.
- Go to parameters and set default value as Logical query.
- Provide a logical query to get the previous day.
0