Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all
If i want to calculate a sum of an amount for max periode date of last year wut expression should i use ?
can anyone help?
May be this:
Sum({<Date = {"$(=Date(Max({<Year = {$(=Max(Year) - 1)}>}Date), 'YourDateFieldFormatHere'))"}>}Amount)
sum({<Year={$(=Max(Year)-1)}>} <your field>)
Try this
Sum({< [Date Field] = {"$(Addmonths([Date Field],-12 )" >} SalesAmt )
Regards,
Anand
hi sunny thanks for your reply
just a question
if my format date is num it apply the same expression?
If its a number, you can try this:
Sum({<Date = {"$(=Max({<Year = {$(=Max(Year) - 1)}>}Date))"}>}Amount)
hi sunny
i need to ask you i tried the expression and it shows me a right answer bur the pro is that when i select on year or period it shows me zero you have an idea if its because the expression ?
HOpe you can help
Try this to exclude any selection in any other date and time fields:
Sum({<Date = {"$(=Max({<Year = {$(=Max(Year) - 1)}>}Date))"}, Year, Month, MonthYear, Period>}Amount)
thank you for your help this work perfectly