Hello guys,
We encountered a problem in one of our reports which shows the data for the selected year (filter) and relevant data for previous year. We have 3 key dates each month, so the problem is related to the key date previous year, since it doesn't have to be exactly "current year -1", if it falls on weekends i.e. Saturday, Sunday. In such cases we would get no data, since that wasn't the key date previous year (f.e. user chooses 05.10.2020 in filter, but when the dashboard is launched, column for the previous year is empty since 05.10.2019 was Saturday - meaning the first working day should have been taken into account -->07.10.2019).
So to resolve this, we have created view with 2 columns: "Current key date" (containing only key dates) and "Key date previous year", so each key date has it's equivalent for the previous year. Now the problem is linking this 2 columns in OBIEE, so that the relevant date for the previous year (based on the value for current date chosen in filter) is retrieved and also shown in the report along with the current date values.
We tried many options that came across our minds, the main idea was to try with session variable and the view (mentioned at the beginning) on RPD, which was supposed to return the adequate date previous year for the defined variable - DIDN'T WORK. Then we tried only with session variables and initialization blocks, without the view, i.e. 2 blocks and 2 variables (1 block with the session variable for "current key date" and 2nd block with the session variable for "current key date previous year" linked to the 1st block, dependency defined within the 'select' for the block) -DIDN'T WORK. And so on, tried lots of similar options, and none of them worked !
Please, if anyone has any ideas how to accomplish this (without losses on performance side
), we would appreciate a lot.
Thanks !
BR, Mihajlo