February 16, 2006, 01:15 PM
Norb EckertNeed" last year totals" column after current column
Hi All,
I'm brand spanking new to WebFocus and need some direction please. I have a report accepting date parameters that sums up the sales by product group and displays two columns. It works fine. I would like to include the totals for the previous year in the same time frame in an additional column as shown below:
Item group Total Last Year Totals
---------- ----- ----------------
2 $10,000 $24,000
35 $8,500 $7,500
9 $6,000 $6,400
I am unclear on how to approach this. I was thinking of using two hold files - 1 to hold the item group and current totals and then run the query again to get last years totals for the same groups, then join the files to create a final report?
I am using version 7.1 of Developer Studio. I am not familiar with the underlying code and I noticed that almost all responses refer to FOCUS code. Yikes!
TIA,
Norb
February 16, 2006, 01:45 PM
mgrackinNorb,
Add an ACROSS sort to your request using YEAR as the ACROSS sort field. In FOCUS code it would look something like this:
TABLE FILE CAR
SUM SALES
BY CAR
ACROSS YEAR
END
The colun title will be the value for YEAR such as '2004' or '2005'.
February 19, 2006, 01:42 AM
PiipsterYou probably want to do BY HIGHEST YEAR... in other words sort descending.