Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi QV,
In my dashboard I have a Year listbox(Data in it are : 2006,2007 to 2014) and a straight table with two dimensions and two expressions.
Expr1 : sum(Revenue YTD)
Expr2 : It should get the revenue of previous year.
Suppose from the list box I have selected year 2014, now Expr1 getting the revenue for selected year(i.e 2014) and Expr2 should display the previous year(i.e 2013).
How to write Expr2 for this. It should display dynamically i.e whatever the year I select from the year list box, Expr1 should display selected year revenue and Expr2 should display the previous year revenue.
Please help me on this.
Thanks,
Ananth
Expr2: sum({<Year={'$(=Max(Year)-1)'}>}Revenue YTD)
Thanks for your response,
by this, I can get only 2013 revenue(static result)
but my requirement is, if I select 2007, expr2 should display 2006 revenue or if I select 2010, expr2 should display 2009 revenue
Are you getting 2013 revenue after selecting 2007?
Not exactly, actually I'm getting zero values for previous year
Make a variable for Year-1 : Var= Year-1
Now write the second expression as =sum({<Year={"$(Var1)"}>}Amount)
If you can post your qvw, it will easier for us to help you.
Check this