Class/method transdate -1 month

I have a problem and nedd some help about ax 2012 how to make class / method show transaction from asset group where transdate -1 month & along of year from january until parameter thank you so much

Please provide more details.

like this maybe
but syntax error hehe
please help

select prevmth(AmountCur) from assettrans where assettrans.AmountCur
&& assettrans.TransType == AssetTransType::Depreciation
&& assettrans.TransDate;

Are you trying to get depreciation amount for previous month? Please confirm.

yes of course

So you have to calculate the start and end date of the previous month.
Then use the select statement to get the depreciation amount between the start data and date.
See \Data Dictionary\Tables\AssetTrans\Methods\amountMSTPerDateForDepreciation

You can use endMth(prevmth(TransDate)) , to get previous month end date.
This may help you in calculating the start date of previous month.
(dynamics-ax-live.blogspot.in/…/how-to-get-first-and-last-day-of-month.html))