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
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)
Can you share a sample data?
Please find the qvw and qvd for your reference.
thanks
It looks like you did not define the variables vPreYear and vPreYearLastMonth in the 'variable overview'.
Also, there is no Updated_OEC_Budget for 'Mechanical Engineering (Labor+Travel)' cost area.
Check out the attached file.
Looks like there was error in the spelling of Cost_Area value. now its working.
You are right it is working. But when I try to create the same expression in my Original application it is still blank. I have added variables also in the Settings -> Variable Overview. Is there anything else you did? thanks
Are you making selections when you are viewing this? Selection in Snapshot_Date? May be try this
Only({<Year = {'$(vPreYear)'} , Month = {'$(vPreYearLastMonth)'}, Cost_Code = {'3'}, Snapshot_Date = >} Aggr(NODISTINCT Sum({<Year = {'$(vPreYear)'} , Month = {'$(vPreYearLastMonth)'}, Cost_Code = {'3'}, Snapshot_Date = >}Updated_OEC_Budget) , [Cost_Area]))
or this
Sum(TOTAL <Cost_Area> {<Year = {'$(vPreYear)'} , Month = {'$(vPreYearLastMonth)'}, Cost_Code = {'3'}, Snapshot_Date = >}Updated_OEC_Budget)
thank you stalwar1 Yes, I am filtering using Snapshot_Date, I have used the expressions which are not giving the desired result.
Attached are the qvw, qvd for your reference.
thanks
Bhavesh
Your variables have no value..