Hi colleagues,
I wrote the following MDX funtion in order to get the Last Year based on the current period
*function PY(%KPI1%) (PARALLELPERIOD([AIC_TIEMPO_SEM].LEVEL00,1,AIC_TIEMPO_SEM].CURRENTMEMBER),%KPI1%) *endfunction
Example:
PY([AIC_T_VERSION].[ACTUAL]);SOLVE_ORDER=10
Member formula
Notes:
AIC_TIEMPO_SEM - Time dimension - DAY granularity
AIC_T_VERSION - Category dimension
Issue:
It works perfectly with non-leap years. Any workaround to solve this mdx when leap year would be helpfull
Version:
SAP BPC 10.0 NW
To my mind parallelperiod will not work on day level with leap years. Number of days is different...
Thanks for the quick response Vadim, is there any other solution or have you faced a similar scenario?
I am unable to understand the required logic! What to do with February 29?
For reporting purposes we need to present data as follows:
With non-leap years everything works fine.
When leap year, staring on 29 Feb (using the parallelperiod function) the Last Year Current doesn't present the correct data.
Sorry, but how is it possible to compare day with day if you have extra day in the leap year??? Logically impossible...
That is precisely the issue with paralllelperiod function, is there any other approach to solve this inconsistency using MDX - member formula.
Thanks again
Sorry, but parallelperiod function assumes that you have equal number of periods on the required level. MDX don't think about days, it will simply count the number of periods from the beginning of the year! And this is by design.
You can create a property like PREVYEARDATE and fill it for all TIME members. Then try to use it with strtomember.
Make sense to me, let me try and let you know.
Thanks again Vadim!