Hi Barb,
Using GridView on your Sales Analysis transactions database is probably the best way to go.
Create calculated columns to list the LY, YTD or other sales amount date range. Ensure that you choose to include a sum for each calculated column, and set a sort order by the customer code. When you summarize the view, you will get one row for each customer and the calculated columns will display totals for LY, YTD etc for each customer.
To create a YTD calculated column, use syntax something like:
IF(
AND(
{Date} >= BEGINYEAR( )
,
{Date} <= TODAY( )
)
,
{Amt}
,
0
)
To create a full Last Year calculated column, use syntax something like:
IF ( YEAR( {Date} ) = Year( TODAY( ) ) -1
,{Amt}
,0)
Syntax for two years ago is similar:
IF ( YEAR( {Date} ) = Year( TODAY( ) ) -2
,{Amt}
,0)
It gets a little more complicated if you want Last Year to Date as opposed to the full year:
IF(
AND(
{Date} >= EDATE(BEGINYEAR(),-12)
,
{Date} <= EDATE(TODAY(),-12)
)
,{Amt}
,0)
where the EDATE function gives you the date a certain number of months in the future or in the past. -12 means the same date 12 months in the past.
_________________________
Regards,
Softrak Tech Support