Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
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, 2003Report 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, 2005Report 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, 2003Report 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, 2006Report 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, 2005Report 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: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report 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: 1948 | Location: New York | Registered: November 16, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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

Copyright © 1996-2020 Information Builders