cancel
Showing results for 
Search instead for 
Did you mean: 

Depreciation Expense

0 Kudos

Hi Experts

I have a requirement where the planning cycle run from April 2013 to December 2018.  We also have information about the various Projects and their In-Service Month, Asset Value, Asset Useful Life.  The In-Service month can be any month in the planning cycle and the depreciation expense should be calculated (Asset Value / Asset Useful Life) and allocated starting from the month after the In-Service month until end of planning cycle month (if the asset life is longer than the plan cycle) or whatever the month when the life ends (if the asset life is shorter than the plan cycle).

Kindly request your expert advise on the approach as to what function should I use in the script logic.

Thanks

Ashok 

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Here is my script but not getting expected results

*SELECT(%MSTART%,MSTART,VERSION,ID = V_WV1)

*SELECT(%MEND%,MEND,VERSION,ID = V_WV1)

*SELECT(%MTHLY_LOOP%,ID,TIME,ID>= %MSTART% AND ID<= %MEND% AND LEVEL = MONTH)

*SELECT(%DEP_LOOP%,ID,TIME,ID>=%STARTPERIOD% AND ID<=%ENDPERIOD% AND LEVEL = MONTH)

*FUNCTION STARTPERIOD = ([SERVICEMONYR].[MONTHYEAR])

*FUNCTION PERIODS = ([TIME].[TNONE],[DATASOURCE].[INPUT],[ACCOUNT].[ASSETLIFE] * 12)

*FUNCTION ENDPERIOD = TMVL(PERIODS,%STARTPERIOD%)

*XDIM_MEMBERSET CCWBS <> CW_NONE

*XDIM_MEMBERSET VERSION = V_WV1

*XDIM_MEMBERSET DATASOURCE = Input

*XDIM_MEMBERSET ACCOUNT = ASSETVALUE, ASSETLIFE, ASSETDEPEXP

*XDIM_MEMBERSET SERVICEMONYR = TNONE

*FOR %PERIOD% = %MTHLY_LOOP%

*SELECTCASE ACCOUNT

     *CASE ASSETVALUE > 0

     *FOR %DEP% = %DEP_LOOP%

          *RUNALLOCATION

               *FACTOR = USING/(TOTAL*12)

               *DIM TIME WHAT = %DEP% ; WHERE = TMVL(1,%DEP%); USING = <<< ; TOTAL =                <<<

               *DIM ACCOUNT WHAT = ASSETVALUE ; WHERE = ASSETDEPEXP ; USING =                ASSETVALUE ; TOTAL = ASSETLIFE

          *ENDALLOCATION

     *NEXT

*ENDSELECT

*NEXT

*COMMIT

former_member186338
Active Contributor
0 Kudos

SELECTCASE is applicable to MDX syntax only...

B.R. Vadim