Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
when I selected 2014 in my year list box, I want to get the 2013 sales data. How can I do this in a chart expression?
Sum({<Yr={$(=max(Yr) -1)}>} data)
Yr is your year field, data is the field you are summing
Sum({<Yr={$(=max(Yr) -1)}>} data)
Yr is your year field, data is the field you are summing
like this
sum({<year={$(=max(year)-1)}>}sales)
Hi,
max(year) means current year or selected year?
if your year field like this
2011,2012,2013,2014
max(years) will give 2014
Hi arul,
If I selected 2013 in my year list box, is it showing 2012 data for the result?
yes based on your selection it will give previous year
for curren year =Max(Year) =2014
For Prev Year =Max(Year)-1=2013
in set analysis you need to define like below and also include year=
Sum({<Year={$(=Max(Year)-1)},Year=>}value)
But the problem is when I selected year=2014 and month=12, I m getting same results for the two columns. why is that?
these are my expressions in my chart.
Num(Sum({<Year={'$(=Max(Year)-1)'},Year=>}Retail_Sale_Qty),'#,##0') - prev year
Num(Sum(Retail_Sale_Qty),'#,##0') - selected year
Hi try like this
Num(Sum({<Year={'$(=Max(Year)-1)'}>}Retail_Sale_Qty),'#,##0') - prev year
Num(Sum(Retail_Sale_Qty),'#,##0')
Regards
ASHFAQ