Need some suggestion on this issue we started facing after upgrading to 12c (12.2.1.2.0) where we are using AGO function in the RPD to get the Year Ago sales. It used to work fine in 11g but after upgrading to 12c we are seeing this issue where the sales for the previous year is showing wrong values. Not sure if this is a bug or not.
Please provide your inputs which all places I should be checking to correct this.
1. We did use the W_DAY_D as the Time Dimension with all the right Chronological key set in the RPD correctly

2. The Physical Query generated is kind of a stitch join
3. I tried creating a measure at the webcat level using the similar formula after pulling in the Time hierarchy - AGO("Measures"."Amount ($USD)" , "Time"."Date Posted"."Year", 1) but it still shows the wrong value against the Year Ago measure of the current month.
4. The only difference I noted is that the Key used Year (PER_NAME_YEAR), Quarter (PER_NAME_QTR) are nullable at the DB level and does contain a row with null value. There is a row in W_DAY_D where ROW_WID = 0 which has all the above fields as null. I don't believe this would cause an issue but need your suggestion if I should replace the null with 0 and test it out (I will do this and check too).

Results: In the example below, the Year Ago Amount for 2017 / 01 should be from 2016 / 01 (3,850,804) but its showing 119,374,929.
