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?
Include 'Month= ' as well
Num(Sum({<Year={'$(=Max(Year)-1)'},Year=,Month=>}Retail_Sale_Qty),'#,##0') - prev year
Num(Sum(Retail_Sale_Qty),'#,##0') - selected year
Hi sunil,
I can't neglect the month because I want december month sales data
its not month restriction that intense to trigger will happen have try and let me no
my problem is still the same
HI,
did you try my solution?
If possible share sample app
Regards
ASHFAQ
I tried, but no change
Please find the attached QVW
Also simple way is using Only,
F.e. you select year 2014, there will be expression only(year)-1, that will handle it,
sum({<year={$(=Only(year))}>} Sales) //First expr that calculates selected year,
sum({<year={$(=Only(year)-1)}>} Sales) //Second expr that calculates year-1,
='Sales '&Only(year_sale) // First expr to label calculation for selected year,
='Sales '&(Only(year_sale)-1) // Second expr to lavel calculation for year-1,
For ease of use you can on general tab of chart properties identify Calculation condition, f.e. Count(DISTINCT year_sale)=1
This means, that chart will shown up only when you select needed (starting) year which will be the basis to count previous year.
Don't forget to set ERROR message that will helps the user choose the year, go to Error messages on General tab of chart properties, and further locate Calculation condition unfulfilled and set reminer for something like that: Please select sales year.
User will see the message in chart, further select the year 2015, and he will see results for 2015 and 2014, if he selects, f.e. 2013, he will see 2013 vs. 2012.
Hope it also will help.
Hi Dushan,
Try this expression
Sum({<Year={$(=(Max(Year)-1))},Month=,Quarter=, Week=, Date=>}value)
Replace Month,Quarter, Week, Date with corresponding fields in your dashboard.
Regards,
Jagan.
thanks all