Issue in Calculating YTD Values to PERIODIC In YTD Model
My model name is a REPORTING which is a YTD model & inputted data in YTD as Below
Image may be NSFW.
Clik here to view.
When I run the report (shown below) with measures as PERIODIC system is displaying months 1/4/7 system is taking YTD values and showing them as periodic values.
As per standard behaviour by default the YTD data must be shown in PERIODIC as
PERIODIC Value = {Present Month YTD Value} – {Previous Month YTD Value}
But in my report I got below values in periodic
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
So if see above for every quarter first month PERIODIC value is posting same as YTD value
But it is not repeating for the rest of the months in every quarter so please rectify the issue & locate where the issue…is.
My FORMULA for measures for PERIODIC is as below
MEMBER [MEASURES].[YTD] AS 'IIF(([%ACCOUNT%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="INC" OR [%ACCOUNT%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="LEQ"),-([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[%TIMEBASELEVEL%])), ([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[%TIMEBASELEVEL%])))' SOLVE_ORDER=3
MEMBER [MEASURES].[PERIODIC] AS 'IIF(([%ACCOUNT%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="INC" OR [%ACCOUNT%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="EXP") AND NOT ([%TIME%].CURRENTMEMBER.PROPERTIES("2/CPMB/PERIOD")="TOTAL" OR [%TIME%].CURRENTMEMBER.PROPERTIES("2/CPMB/PERIOD")="Q1" OR [%TIME%].CURRENTMEMBER.PROPERTIES("2/CPMB/PERIOD")="JAN"), [MEASURES].[YTD]-([MEASURES].[YTD],[%TIME%].LAG(1)), [MEASURES].[YTD])' SOLVE_ORDER=3
And also let me know how the “LAG()” searches & on what bases it will identify the previous month