Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
i want to compare sales ie current year and previous year sales on basis of selection of season code from same list boxes
so for current season i have declared variable as
vSales_summary_current_season=GetCurrentfeild([Season Code])
vSlaes_Summary_Current_Season=GetCurrentFeild(season code)-1)
expression for previous year season
Num( sum({$<Sold_year ={"$(=max(Sold_year)-1)"},season={$(vSales_Summary_Previous_Season)-1}>} [inv value]/Sales_INR_Unit ), '#,##0.0')
the above expression is giving an error
expression for current year
Num( sum({$<Sold_year ={"$(=max(Sold_year)-1)"},season={$(vSales_Summary_current_Season)}>} [inv value]/Sales_INR_Unit ), '#,##0.0')
But, GetCurrentField() function returns only Field Name, How you want to publish and generate ??
i want when i select a season from list box which is present under (select previous season) then the corresponding sale should be present under (previous year season ) in chart
and similarly when i select a season code from (select current season) then the corresponding sales should be present under current year season in chart so for that are my expression's and variables declared correct?
Num( sum({$<Sold_year ={"$(=max(Sold_year)-1)"},season={$(vSales_Summary_Previous_Season)-1}>} [inv value]/Sales_INR_Unit ), '#,##0.0')
the above expression is giving an error
Have you declared (Assigned) the variable " vSales_Summary_Previous_Season "any where ?
yes i have declared the above variable as following:-
vSlaes_Summary_previous_Season=GetCurrentFeild(season code)-1) but its giving an error so what changes should i do to make it functinable?
The way your way is won't possible, Instead you can try something like below. then we can talk about Variable definition later..
Num( sum({$<Sold_year ={"$(=max(Sold_year)-1)"},season={"$(=GetFieldSelections(GetCurrentField([Season Code])))"}>} [inv value]/Sales_INR_Unit ), '#,##0.0')
OR
Num(sum({$<Sold_year ={"$(=AddYears(max(Sold_year),-1))"},season={$(=Concat(Chr(39) & GetFieldSelections(GetCurrentField([Season Code])) & Chr(39), ',')}>} [inv value]/Sales_INR_Unit ), '#,##0.0')
the better way to compare selections is to work with alternate state
see this
Regards
its giving 0 vales in chart
Please start filter from [Season Code]? And check
well its functioning for previous season but for current season what should be the expression?