Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table as shown below.
My expression for selecting December month data of previous year for all the months for As Sold Upd OEC (Baseline) is not working.
=Aggr(NODISTINCT Sum({<Year = {$(vPreYear)} , Month = {$(vPreYearLastMonth)}, [Cost_Area] = {'Mechanical Engineering (labor + travel)'}, Snapshot_Date = >}Updated_OEC_Budget) , [Cost_Area])
What wrong am I doing here?
stalwar1 Can you help me on this?
Any help is appreciated? thanks
I have declared the variables in the back script as
vPreYear =Year(YearEnd(AddYears(max(Snapshot_Date),-1)))
vPreYearLastMonth =Month(YearEnd(AddYears(max(Snapshot_Date),-1)))
Is this something wrong in setting the variables
Try this
Let vPreYear = '=Year(YearEnd(AddYears(max(Snapshot_Date),-1)))';
Let vPreYearLastMonth = '=Num(Month(YearEnd(AddYears(max(Snapshot_Date),-1))))';
and use this expression
Sum(TOTAL <Cost_Area> {<Year = {'$(vPreYear)'} , Num_Month = {'$(vPreYearLastMonth)'}, Cost_Code = {'3'}, Snapshot_Date = >}Updated_OEC_Budget)
Awesome it worked. Thank you Sunny . I understood what should I do now