RE: SmartList Builder date calculation
There are a variety of functions through which you can reach your target. Initially, you should calculate the previous month of the previous year as a parameter to be passed for the (case) function. your data set should have either a full date field under one column or two columns (Year and Month)
- In case you have a date field, consider the date function, Date Part
- In case you already have the month and the year in two separate columns, you need to simply subtract (one) from the year to get the previous year. The month remains the same
Now you can proceed with the condition function.
CASE {Table1:Field1}
WHEN value1 THEN {Table1:Field1} + {Table1:Field2}
WHEN value2 THEN {Table1:Field1} + {Table1:Field3}
ELSE {Table1:Field1} + {Table1:Field4}
END
As a reference for your task, you can refer to very useful support article from Microsoft on a list of functions that can be used with Smart List builder
To save yourself a lot of headache, you can create a custome SQL view on the database level, to be published to Dynamics GP without further manipulation on the Smart List builder. You can make use of Victoria Yudin SQL view SQL view for SOP sales by customer by month
Your feedback is highly appreciated,