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     Calculation using Column Totals
Go
New
Search
Notify
Tools
Reply
  
Calculation using Column Totals
 Login/Join
 
Platinum Member
posted
I would like to use the column totals in an ACROSS report to compute a new value, and then to display this value beneath the Column Total at the end of the report.


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Try a multiverb request. Need I say more?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
But, I need the individual across values, e.g. C1, C2, etc not just the overall total.


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
mcguyver maybe?

Next year you should visit the summit
There is a wonderfull presentation that shows you all smart solution in one hour.
Worth all the time, but register in time, places are all used.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
define file ...
tvalue/... = value ;
end

table file ...
write tvalue noprint
across colkey
write value
across colkey
by rowkey
...
end

should give you n col total variables and n col detail variables which you can reference in COMPUTE or RECAP.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
I would like to use the column totals in an ACROSS report to compute a new value


What type of compute is on your mind? Is it a function of the number of columns only or also of the values of the ACROSS sort field?

For example:
I sum SALES BY COUNTRY ACROSS SEATS.
The new value is the sum of the column-total for all seats with an even number.
  
-* File gcohen01.fex
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM SALES BY SEATS 
ON TABLE SAVE
END
-RUN
-SET &S=&LINES;
-SET &T=0;
-SET &SP='<+0> ';
-REPEAT #COMP FOR &I FROM 1 TO &S;
-READ SAVE &SEAT.A3. &SALES.A6.
-TYPE &SEAT &SALES
-SET &T = &T + IMOD(&SEAT + 1, 2, 'I2') * &SALES;
-SET &SP=&SP | '<+0> ';
-#COMP
-RUN
-SET &SP=&SP | '<FST.T'
DEFINE FILE CAR
T/I6=&T;
END
TABLE FILE CAR
SUM 
     SALES
ACROSS  SEATS
BY  LOWEST COUNTRY
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE SUBFOOT
"&SP"
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=ACROSSVALUE,
     ACROSS=1,
     BACKCOLOR='WHITE',
$
TYPE=ACROSSVALUE,
     COLUMN=ROWTOTAL(1),
     BACKCOLOR='WHITE',
$
TYPE=TABFOOTING, HEADALIGN=BODY, 
$
ENDSTYLE
END

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1959 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks for everyone's input.

GCohen, we have a McGyver Dynamic Subtotals/SubFoots technique under the tips and techniques section, which may be of help: http://www.informationbuilders...opers/McGyverDynamic

Happy holidays to everyone!! Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1950 | Location: New York | Registered: November 16, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Calculation using Column Totals

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