Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
lionking15
Creator
Creator

straight table

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!!!!!!!!

4 Replies
karthikoffi27se
Creator III
Creator III

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

miguelbraga
Partner - Specialist III
Partner - Specialist III

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

lionking15
Creator
Creator
Author

thanks

but why this "GetFieldSelections" function is used??

karthikoffi27se
Creator III
Creator III

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