Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want sum of salary for year one less than what i select.
suppose i select 2011, then i would require sum of salary in 2010
Below expression is not giving correct results.
=sum({<Date ={$(=(GetCurrentSelections(Date)-1))}>}salary)
Try like
I assume, You have year values in date field
Sum({<Date = {'$(=Max(Date)-1)'}>} salary)
or
I assume, you have Year field where you already declare in script like Year(Date) as Date
Sum({<Year = {'$(=Max(Year)-1)'}>} salary)
or
Still you want to get last year date sales you can use like below
Sum({<Date = {'$(=AddYears(Max(Date),-1))'}>} salary)
No. not like that.
I have used this expression, i am building using getfieldselection, can you help?
Without knowing anything, we can't offer much. But use GetFieldSelections() may be?
Your Date field contains Year?
yes, year
Then you best bet will be to use the expression provided by Anil.
Sum({<Year = {'$(=Max(Year)-1)'}>} salary)
Not sure why you want to complicate matters by using GetFieldSelections()? Is there a reason why you want to use this? Knowing the reason might help us give you a better response here
hi
i have done this using this Sum({<Year = {'$(=Max(Year)-1)'}>} salary), just wanted to build it through Getfieldselection..
just a curiosity
If you will only select one year, then may be this
Sum({<Year = {'$(=GetFieldSelections(Year)-1)'}>} salary)