Focal Point
[SOLVED]SUBTOTAL problems

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

April 14, 2009, 06:07 PM
Lloyd
[SOLVED]SUBTOTAL problems
To Start Here is a sample of my output:
BIG STORES STORE 1 (MW/C)     19.3    27.3    29.7  -29.3  -35.0 |   19.3    27.3    29.7 -29.3 -35.0 
           STORE 2(NW)        32.1    57.1    42.0  -43.8  -23.6 |   32.1    57.1    42.0 -43.8 -23.6 
           STORE 3(SCAL)      43.4    53.5    60.0  -18.9  -27.7 |   43.4    53.5    60.0 -18.9 -27.7 
           STORE 4(EC)        27.3    38.2    51.0  -28.5  -46.5 |   27.3    38.2    51.0 -28.5 -46.5 
           STORE 5(SO)        39.4    33.9    47.7   16.2  -17.4 |   39.4    33.9    47.7  16.2 -17.4 
           STORE 6(NCAL)      31.2    47.9    36.2  -34.9  -13.8 |   31.2    47.9    36.2 -34.9 -13.8 
TOTAL SALES: BIG STORES      192.7   257.9   266.6  -25.3  -27.7 |  192.7   257.9   266.6 -25.3 -27.7 
TOTAL SALES: ALL STORES    1,449.7 1,800.7 1,560.4  -19.5   -7.1 |1,242.0 1,520.9 1,344.4 -18.3  -7.6 
TOTAL SALES: NON OUTLET    1,242.0 1,520.9 1,344.4 -302.3  -91.9 

My issue is with the last two lines of the report. ALL STORES represents the total sales ,total plan, total last year sales. The 4th column is a percent of plan, percent of LY. Same goes for the NON OUTLET, except it omits any outlet stores. Everything to the right of the pipes is the same as to the left except they omit OUTLETS (THESE DONT PRINT, THEY ARE THE COMPUTES I USED FOR THE NON OUTLET LINE.) The report uses a SUBFOOT with ST prefix ops on each field to get the NON OUTLET Line, but as you see, the 4th column (and 5th) is incorrect. It should be -18.3 as in the 4th column on the right side of the ALL STORES Line.

Questions are:
1. what am doing wrong, (or the guy who original wrote this report)?
2. The formula for the 4th column is (col1 - col2)/col2. How can I get this to calculated correctly?
3. Is SUBFOOT the proper functiom to use?

Thanks all.....

BTW this has about 7 section of 5 columns each that does this. This only a cut-paste to give you an idea. I can print code, but it stinks, I'd have to clean up it considerably. Let me know if you need it....

This message has been edited. Last edited by: Lloyd,


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
April 15, 2009, 03:15 AM
GamP
Question were:
1. what am doing wrong, (or the guy who original wrote this report)?
2. The formula for the 4th column is (col1 - col2)/col2. How can I get this to calculated correctly?
3. Is SUBFOOT the proper functiom to use?

Possible answers:
1. Not much from the look of it, just the total is a bit off.
2. Seems to be right.
3. SUBFOOT can be used, but if you specify ST prefix it just does that - it subtotals the fields. I think you need to look in the direction of RECOMPUTE or, if that does not help, RECAP.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
April 15, 2009, 03:28 AM
<JG>
Lloyd unfortunately without seeing some code it's not possible to see where your error is.

However as you have the correct values in your computes it looks to be a reference issue.
April 15, 2009, 09:03 AM
Lloyd
OK...I spent some time reading manuals and some other posts and figured out I can do a RECAP (thanks Gamp) for those fields and then use them in the SUBFOOT.


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0