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     Multiple BY phrases and Subtotals with FML

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Multiple BY phrases and Subtotals with FML
 Login/Join
 
Platinum Member
posted
Can you create multiple subtotals using FML? If you had code like:

 
TABLE FILE SAMPLE
SUM
BUDGET 
ACTUALS
COMPUTE VARIANCE/P12.2 = BUDGET - ACTUALS;
BY CAMPUS NOPRINT
BY SCHOOL NOPRINT
FOR SUM_ID
38 TO 43  AS 'SALARY EXPENSES' LABEL SALARY OVER
44  AS 'BENFIT EXPENSES' LABEL FRINGE OVER
46 ADD AS 'NON-SALARY EXPENSES' LABEL EXP OVER
BAR OVER
RECAP EXPTOT= SALARY + FRINGE + EXP; AS 'TOTAL' OVER
RECAP EXPTOT(6) = (EXPTOT(4)/EXPTOT(2)) * 100;  OVER
RECAP EXPTOT(12) = (EXPTOT(10)/EXPTOT(8)) * 100;  OVER
BAR AS '='
ON CAMPUS SUBHEAD
"<CAMPUS"
ON SCHOOL SUBHEAD
"<SCHOOL"
END
 


Right now I get the Salary, Benefits, Non-Salary Expenses totaled by school, but how can I also add an overall total for the entire CAMPUS?

So the output would look like:

West Campus                BUDGET   ACTUALS    VARIANCE
     School of Law
       SALARY EXPENSES     1,200    1,000          200          
       BENEFIT EXPENSES    1,000    1,000            0    
       NON-SALARY EXPENSES 2,000    1,000        1,000
     TOTAL                 4,200    3,000        1,200

     School of Business
       SALARY EXPENSES     1,200    1,000          200          
       BENEFIT EXPENSES    1,000    1,000            0    
       NON-SALARY EXPENSES 2,000    1,000        1,000
     TOTAL                 4,200    3,000        1,200

TOTAL WEST CAMPUS          8,400    6,000        2,400


East Campus                BUDGET   ACTUALS    VARIANCE
     School of Nursing
       SALARY EXPENSES     5,200    1,000        4,200          
       BENEFIT EXPENSES    1,000    1,000            0    
       NON-SALARY EXPENSES 2,000    1,000        1,000
     TOTAL                 8,200    3,000        5,200

     School of Journalism
       SALARY EXPENSES     1,200    1,000          200          
       BENEFIT EXPENSES    1,000    1,000            0    
       NON-SALARY EXPENSES 2,000    1,000        1,000
     TOTAL                 4,200    3,000        1,200

TOTAL EAST CAMPUS         12,400    6,000        6,400
    


Thanks,
Bethany


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
Virtuoso
posted Hide Post
If you just add ON TABLE SUMMARIZE, what do you get?

Other option would be to run the same request immediately following the first (or in compound report format) without the BY fields / subheads.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Bethany

In stead of using the BY statement I would try to add on or more hierarchy levels if that would be possible.
You will have more control over the totals and subtotals.

You can calculate the average per campus.

You now have first two BY and then FOR
Have you tried to change the sequence of BY and FOR?




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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Multiple BY phrases and Subtotals with FML

Copyright © 1996-2020 Information Builders