Categories
- All Categories
- Oracle Analytics Learning Hub
- 19 Oracle Analytics Sharing Center
- 18 Oracle Analytics Lounge
- 232 Oracle Analytics News
- 44 Oracle Analytics Videos
- 15.9K Oracle Analytics Forums
- 6.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 86 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
How to optimize dynamic fiscal year-end date calculation logic?
I’m using the below expression to derive the enterprise’s fiscal year-end date dynamically based on the current date:
TO_DATETIME(
CONCAT(
TRIM(TRAILING FROM CAST(
CASE
WHEN MONTH(CURRENT_DATE) IN (1, 2, 3) THEN YEAR(CURRENT_DATE) - 1
ELSE YEAR(CURRENT_DATE)
END AS CHAR
)),
'/03/31'
),
'YYYY/MM/DD'
)
This logic works correctly, but when I use it in other dependent calculations, the queries take around 3–5 minutes to load and display results
However, when I replace it with a constant date value like below, it performs much faster:
TO_DATE('2025/03/31', 'YYYY/MM/DD')
Is there a recommended way to optimize or handle such dynamic date calculations in FDI to avoid performance issues?
Answers
-
Hi @User_N2GB3,
Welcome to the Oracle Analytics Community!
Have you tried defining the calculated column in the semantic layer as a variable and then call it in report? This way it will be already calculated and might get some performance benefit.
Please take a look into the following documents / video.
https://blogs.oracle.com/analytics/post/using-session-and-repository-variables-in-oracle-analytics
Hope this help.
Thank you.
0
