Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
How i can compare current vs previous sales by giving the current year in selection and the month
and return me in a chart the sales for the month of the current year and the month for the previous year.
I have created a variable for the previous year vPreviousYear=(Year)-1
and in the expression i give the following:
=Sum({<YEAR={'$(vPreviousYear)'},MONTH_ID=>}sales)
and returns me 0
Try Below:
=Sum({1<YEAR={"$(=Max(YEAR)-1)"},MONTH_ID=>}sales)
If you selected the YEAR value 2013, the data for 2012 was greyed out. SO you need to put {1} to ignore the current selections.
It returns me wrong sales. Very big amounts.
Please post sample qvw or some test data.
just go to the variable and but equal sign before the expression, so it should be =(Year)-1 instead of (Year)-1