Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All
I try to get a last year figure in my script given using given below expressins
sum( {$<TRAN_YEAR= {"$(=Only([TRAN_YEAR]-1))"}>} [Actual])
It is 100% work,
But i want to hard cord get a figure only GROSS_PREMIUM. I use get a current year GROSS_PREMIUM given below expression
Sum ( {$<DESCRIPTION= {'GROSS_PREMIUM'} >}[Actual])
I WANT CONECT ABOVE TWO EXPRESSION AND GET A LAST YEAR GROSS_PREMIUM ONLY.
Please help me.
Sagara
=sum( {$<TRAN_YEAR= {"$(=Only([TRAN_YEAR]-1))"} and DESCRIPTION= {'GROSS_PREMIUM'} >} [Actual]) )
sum( {$<DESCRIPTION= {'GROSS_PREMIUM'}, TRAN_YEAR= {"$(=Only([TRAN_YEAR])-1)"}>} [Actual])
Your 'and' is improper here. It should be replaced by a comma (,).
may be like this?
=sum( {<TRAN_YEAR= {'$(=Only([TRAN_YEAR]-1))'},DESCRIPTION= {'GROSS_PREMIUM'}>} [Actual])
or
=sum( {<TRAN_YEAR= {'$(=max([TRAN_YEAR])-1)'},DESCRIPTION= {'GROSS_PREMIUM'}>} [Actual])
and check this as well, helpful for you?
sum( {$<DESCRIPTION= {'GROSS_PREMIUM'}, TRAN_YEAR= {"$(=Only([TRAN_YEAR]-1))"}>} [Actual])
Just wanted to know the use of 'only' here, I think its not making sense here, may be I am missing something..
sum( {<TRAN_YEAR= {'$(=Only([TRAN_YEAR])-1)'},DESCRIPTION= {'GROSS_PREMIUM'}>} [Actual])
-1 is given the outside of the braces
Yes it would even work similarly without the function only(). It's that - to tell explicitly that the expression would work only on - single value selection of Year field TRAN_YEAR.
Hi
PLEASE TRY THIS EXPRESSION.
sum( {$<TRAN_YEAR= {'$(=max([TRAN_YEAR])-1)'}, DESCRIPTION ={'GROSS_PREMIUM'}>} [Actual])