Hi all,
I've a curious behaviour on time series functions.
I'm working on 12c (12.2.1.2.0) version.
My fact table is at day grain,
my time hierarchy is correctly set up (chron K are present).
Trying to build a simple report
MONTH | REVENUE | AGO (REVENUE,MONTH,1)
For some months the ago function is not working properly.
Going deep in analysis, looking at physical SQL i found how OBIEE calculate AGO periods
and I found the issue on SQL side, but I think that this function is used all around the world so I think (hope) that the error could be on my setup.
Here's what I've found:
OBIEE build two logical table in the SQL,
- table 1
nr. months | nr. weeks | nr. day in week
- table 2
nr. months+1 | nr. weeks | nr. day in week
then OBIEE joins the two tables with all columns to create correspondance with current month and previous month.
In my case I've selected dates between 01 Jan 2017 and 28 Feb 2017.
If I look at the output of intermediate SQL,
table 1 (referred to Feb) has
2 months | 5 weeks | 7 day in week
table 2 (referred to Jan) has
2 months | 6 weeks | 7 day in week
So for week 6 of Jan the join is not resolved - Feb has only 5 weeks - and I loose those days in the sum of my measure.
Seeing that , it looks to me that AGO function could work only at month or year level, when my fact table has month grain...could not find anything on Oracle doc about that.
Am I doing something wrong?
Kind regards and sorry for very long post..
Marco