Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i am having a table consist of fields Customer,sales id,sales,ShipDate,product,quantity and i have linked ShipDate to master calender.
and the issue is that i have to create
straight table having below expressions
Current Year Sales, Previous Year Sales, Current Month Sales, Previous month Sales and product as dimension.
means if i select 2014 and month as august,i should get 2014 data in Current Year Sales,2013 data in Previous Year Sales,august data in Current Month Sales and july data in Previous month Sales
thanks!!!!!!!!
Hi Giridhar,
You can use this to get your current year sales and previous year sales based on year and month
CurrentYearSales: '=sum({<Year={"=Max(Year)"}>}SalesValue)'
PreviousYearSales: '=sum({<Year={"=Max(Year)"}>}SalesValue)'
CurrentMonth: '=sum({<Month={"$(=GetFieldSelections(Month))"}>}SalesValue)'
PreviousMonth: '=sum({<Month={"$(=GetFieldSelections("Month")-1)"}>}SalesValue)'
Hope this helps.
Many Thanks
Karthik
Just a correction:
CurrentYearSales: '=sum({<Year={"=Max(Year)"}>}SalesValue)'
PreviousYearSales: '=sum({<Year={"=Max(Year - 1)"}>}SalesValue)'
CurrentMonth: '=sum({<Month={"$(=GetFieldSelections(Month))"}>}SalesValue)'
PreviousMonth: '=sum({<Month={"$(=GetFieldSelections("Month")-1)"}>}SalesValue)'
But otherwise Giridhar try this solution provided by Karthikeyan
Regards,
MB
thanks
but why this "GetFieldSelections" function is used??
Hi Giridhar,
GetFieldSelections() is used to fetch the value from the CurrentSelection.
Please refer below blog for more details.
Missing Manual - GetFieldSelections() + Bonus Example
Many Thanks
Karthik