Focal Point
Need" last year totals" column after current column

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6381085451

February 16, 2006, 01:15 PM
Norb Eckert
Need" 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


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
February 16, 2006, 01:45 PM
mgrackin
Norb,

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'.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
February 19, 2006, 01:42 AM
Piipster
You probably want to do BY HIGHEST YEAR... in other words sort descending.


ttfn, kp


Access to most releases from R52x, on multiple platforms.