Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to calculate the charge amount for the previous year. I am using the following formula but it's not working. Can somebody help me out?
Sum({<Corrected ={'N'}, year(posting date)= {$(=year(posting date) - 1)}>} Amount)
-
Sum({<Corrected ={'Y'},year(posting date)= {$(=year(posting date) - 1)}>} [Amount])
Hi,
You can try the following:
Define a variable
LastYear = Year (PostingDate) -1
and change the expression like this:
Sum({<Corrected ={'N'}, Year (PostingDate) = $ (LastYear))}>} Amount)
-
Sum({<Corrected ={'Y'},Year (PostingDate) = $ (LastYear)}>} [Amount])
OK, try this:
Sum({<Corrected ={'N'}, Year (PostingDate) = {$ (LastYear)}>} [Amount])
-
Sum({<Corrected ={'Y'},Year (PostingDate) = {$ (LastYear)}>} [Amount])