Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Supress Grand Totals for certain columns
Go
New
Search
Notify
Tools
Reply
  
Supress Grand Totals for certain columns
 Login/Join
 
Gold member
posted
Hi,

I want to know if there is any command to supress grand totals for certain columns.

For example, I have C1 C2 C3 C4 C5 columns
I am doing sub-total by C1
I want the output to be

C1 C2 C3 C4 C5
a 1 2 3 4
5 5 5 5
total for a 6 7 8 9
-------------------------------
b 6 6 6 6
total for b 6 6 6 6
-------------------------------
total(for c2 and c4) 12 14

I want to supress the grand total for C3 and C5.

Any ideas?
 
Posts: 76 | Registered: October 28, 2003Reply With QuoteReport This Post
<mhuber>
posted
You can't suppress grand totals directly, although you can achieve the same effect. Basically, if you have a common value across all rows in the table, you can subtotal on this, and achieve a grand total. Cool

Below you'll see examples using DEFINE and COMPUTE. Basically, the only difference is BY TOTAL with the compute field.

Regards,
Michael

-***********DEFINE
DEFINE FILE CAR
SPACE/A1 WITH COUNTRY = ' ';
END
TABLE FILE CAR
PRINT
SALES
DEALER_COST
SEATS
RETAIL_COST
BY SPACE NOPRINT
BY COUNTRY
ON COUNTRY SUBTOTAL
SALES
DEALER_COST
SEATS
RETAIL_COST
AS 'SUBTOTAL'
ON SPACE SUBTOTAL
DEALER_COST
RETAIL_COST
AS 'GRAND TOTAL'
ON TABLE NOTOTAL
END

-***********COMPUTE
TABLE FILE CAR
PRINT
COMPUTE SPACE/A1 = ' '; NOPRINT
SALES
DEALER_COST
SEATS
RETAIL_COST
BY TOTAL SPACE NOPRINT
BY COUNTRY
ON COUNTRY SUBTOTAL
SALES
DEALER_COST
SEATS
RETAIL_COST
AS 'SUBTOTAL'
ON SPACE SUBTOTAL
DEALER_COST
RETAIL_COST
AS 'GRAND TOTAL'
ON TABLE NOTOTAL
END
 
Reply With QuoteReport This Post
<mhuber>
posted
oops... that's what I get for not testing my code before I post it.

It doesn't seem to be working because we're subtotalling on COUNTRY as well as on SPACE.

I'll have to give this more thought...
-Michael
 
Reply With QuoteReport This Post
Expert
posted Hide Post
RB, you can specify just the grandtotals that you want in your SUMMARIZE line.
ON TABLE SUMMARIZE C1 C2 C4
This line overrides the default grandtotals provided to you by your subtotalling activity.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi Susannah,
Summarize command did not work. It overrides even the subtotals.
I used the summarize command as
ON TABLE SUMMARIZE C2 C4
Now I get the output as
C1 C2 C3 C4 C5
a 1 2 3 4
5 5 5 5
total for a 6 8
-------------------------------
b 6 6 6 6
total for b 6 6
-------------------------------
total(for c2 and c4) 12 14

I need to get the subtotal for all the columns C2 C3 C4 C5, grand totals for C2 and C4.
 
Posts: 76 | Registered: October 28, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Rb, you need both commands, SUBTOTAL as you had it, and SUMMARIZE as you needed it.
TABLE FILE CAR
SUM SEATS WEIGHT BY COUNTRY BY MODEL
ON COUNTRY SUBTOTAL
ON TABLE SUMMARIZE SEATS
END
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Susannah,
I included the subtotal comamnd when I used summarize command. But it did not work. I used styling option.
ON TABLE SET STYLE *
TYPE=GRANDTOTAL, COLOR = WHITE, COLUMN=C3,$
TYPE=GRANDTOTAL, COLOR = WHITE, COLUMN=C5, $
END STYLE
This hides the grandtotal of C3 and C5 as color of the output is same as the background color.
This is not a very good solution though. But it works.
 
Posts: 76 | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Supress Grand Totals for certain columns

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.