Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i want compare of current year sales and previous year sales,so i tried using this expression
sum({<Year={"$(=Max(Year))"}>}LineSalesAmount)
i did't get the result of that ,so please help to get a result
Try this
=sum({<Year={"$(=Max(Year)-1)"}>}LineSalesAmount)
Hi Ravinder,
For current year: =sum({<Year={$(=Max(Year))}>}LineSalesAmount)
For previous year: =sum({<Year={$(=Max(Year)-1)}>}LineSalesAmount)
Thanks,
Partha Kulkarni
Are you comparing it in a text box object or a chart? Where exactly are you trying to make this comparison?
Current Year YTD= Sum({$<Year={$(=Max(Year))}>}LineSalesAmount)
Last Year YTD= Sum({$<Year={$(=Max(Year)-vYear)}>}LineSalesAmount)
create a variable year vYear=1
create a input box with variable vYear
is Year a date filed or a string field?
if you put max(Year) in a text box do you get the correct result?
if yes then your expression should work for the selected year
and for the previous year
sum({<Year={"$(=Max(Year)-1)"}>}LineSalesAmount)
hth
Sasi
for charts
create a variable Max(Year) in the variable overview.
And in the expression set analysis use below expression:
sum({$<Year = {$(=vCy)}>}Sales)