on 08-21-2023 6:22 PM
Hi ,
The version dimension has two attributes Start_date (202308) and End_Date (202412) and the asset dimension has a disposal month attribute (202410). The disposal month will vary from asset to asset and a few assets might be greater than the end date.
if the disposal month is less than the end date, then tractional data should copy from the previous month to the disposal month only.
if the disposal month is greater than the end date, then transaction data should copy from previous months to the end date.
With Regards,
KBR.
kollibrahma
Thanks for putting up the example. The below code should do the job. I have created the example using Product dimension but you can replace it with your Asset dimension
Version Dimension
Asset Dimension
MEMBERSET [d/CALMONTH] =[d/Version].[p/START_DATE] TO [d/Version].[p/END_DATE]
MEMBERSET [d/MEASURE]="DEPRECIATION"
DELETE()
FOREACH [d/CALMONTH]
IF DATEDIFF([d/CALMONTH],[d/SAP_CEP_PRODUCT].[p/DISPOSAL_DATE],"MONTH")>=0 THEN
DATA()=RESULTLOOKUP([d/CALMONTH]=PREVIOUS(1,"MONTH",[d/Version].[p/START_DATE]),[d/Version]="public.Actual")
ENDIF
ENDFOR
Initial Data:
After Depreciation Copy
Asset1 with disposal date 202410, data was copied only till 202410
Asset2 with disposal date 202504, data was copied only till 202412 (202504 > 202412 (version end date)
Hope this helps !!
Please accept/upvote if this helps
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
kollibrahma
if the disposal month is less than the end date, then tractional data should copy from the previous month to the disposal month only.
if the disposal month is greater than the end date, then transaction data should copy from previous months to the end date.
Which previous month ? Previous is subjective. Could you put up an example. I think I had answered a similar question before on depreciation. Your example will help in answering your query better.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.