Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to display the cumulative sales for the current and previous year
In the label the expression "=Only([YEAR]-1)" seems to works correclty as show in the screenshot
But I can't make the expression "=sum( {$<Year = {$(=Only([YEAR]-1))}>} AMOUNT ) " working, it always evaluate the current year.
Am I doing anything wrong ?
/Eric
Hi
u select the year in ur year field what ur using in the expression
sum({<YEAR={$(=only(YEAR)-1)}>}[Net Amount])
Try and move the "-1" out of the only function like this
"=sum( {$<Year = {$(=Only([YEAR])-1)}>} AMOUNT ) "
Hi
sum({<YEAR={$(=only(YEAR)-1)}>}[Net Amount])
it show values only when u select the year
otherwise it show all 0,s
u must select the one year for it
HI ,
Try this Expression.
Current Year Sales:
sum({<Year= {"$(=Max(Year))"}>} AMOUNT )
Last Year Sales:
Sum({<Year = {"$(=Max(Year )-1)"}, Quarter=, Year=>} AMOUNT )
Regards,
Nirav Bhimani
Hi,
That did not change anything
I ahve a list box property where I select the [YEAR] attribute.
The max year did not solve the problem, could it be that my data is corrupted ?
Hi,
Both expressions will work. Can u share a demo file so that I can help you.
Regards,
Nirav Bhimani
Hi
u select the year in ur year field what ur using in the expression
sum({<YEAR={$(=only(YEAR)-1)}>}[Net Amount])
Thanks a lot, I add one characters $ that was not needed