6 Replies Latest reply: Aug 5, 2016 3:19 AM by arul settu

Current and Previous Year Sales

Hello Experts,

I have created two measures:

1. RevCurrentYear with the expression:  Sum({<Year={"\$(=getfieldselections( Year))"}>} RowTotal )

2.RevPreviousYear with the expression: Sum({<Year={"\$(=getfieldselections( Year)-1)"}>} RowTotal )

The first expression of (RevCurrentYear) works fine but the second one (RevPreviousYear) gives the same result as of RevCurrentYear.

Can you please guide me, what is the problem in second one ?

Thanks & Best Regards,

• Re: Current and Previous Year Sales

attach sample qvw

Vikas

• Re: Current and Previous Year Sales

try this

Sum({<Year={\$(=Max(Year))}>} RowTotal )

Sum({<Year={\$(=Max(Year)-1)}>} RowTotal )

• Re: Current and Previous Year Sales

Thanks for reply Arul, both the expression are giving same result. Does not serve the purpose.

• Re: Current and Previous Year Sales

can you pose the qvw?

• Re: Current and Previous Year Sales

Arul, by the way in expression editor the Year color is BLUE. whereas I believe it should be brown ... hope that may be helpful ...

• Re: Current and Previous Year Sales

it is not the issue. if you give "" it will be brown

Sum({<Year={"\$(=Max(Year)-1)"}>} RowTotal )