Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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,

6 Replies
vikasmahajan

attach sample qvw

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
arulsettu
Master III
Master III

try this

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

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

Not applicable
Author

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

Not applicable
Author

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

arulsettu
Master III
Master III

can you pose the qvw?

arulsettu
Master III
Master III

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

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