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     [CLOSED] Running group total with across

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Running group total with across
 Login/Join
 
Member
posted
How can I get a running GROUP total with an across? As you can see the GROUP total for up to 5 is only the total for 5, it is not the cummulative total for 2,4, and 5 seats.

DEFINE FILE CAR
GROUP/A20 = IF SEATS LE 2 THEN 'Up to 2 Seats' ELSE
IF SEATS LE 4 THEN 'Up to 4 Seats' ELSE
IF SEATS LE 5 THEN 'Up to 5 Seats';
END
TABLE FILE CAR
SUM
SALES/D12 AS 'Sales'
RETAIL_COST AS 'Retail,Cost'
DEALER_COST AS 'Dealer,Cost'
COMPUTE M1/D6.2% = RETAIL_COST / DEALER_COST; AS '%'
BY GROUP NOPRINT
BY SEATS AS 'Seats'
BY BODYTYPE
BY CARS
ON GROUP SUBTOTAL
ON SEATS SUBTOTAL
ACROSS COUNTRY AS '' RECOMPUTE AS 'TOTAL COUNTRIES'
ON TABLE NOTOTAL
END

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


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
Expert
posted Hide Post
Hi Swamp,

Can you please try the following:

DEFINE FILE CAR
GROUP/A20 = IF SEATS LE 2 THEN 'Up to 2 Seats' ELSE
IF SEATS LE 4 THEN 'Up to 4 Seats' ELSE
IF SEATS LE 5 THEN 'Up to 5 Seats';
END
TABLE FILE CAR
SUM 
COMPUTE RTSEATS/I5=MAX.SEATS + RTSEATS;  NOPRINT
BY GROUP 
SUM 
SALES/D12 AS 'Sales'
RETAIL_COST AS 'Retail,Cost'
DEALER_COST AS 'Dealer,Cost'
COMPUTE M1/D6.2% = RETAIL_COST / DEALER_COST; AS '%'
ACROSS COUNTRY AS '' RECOMPUTE AS 'TOTAL COUNTRIES'
BY GROUP  
BY SEATS AS 'Seats'
BY BODYTYPE
BY CARS
ON GROUP SUBFOOT
" THIS IS THE RUNNING TOTAL <RTSEATS"
ON TABLE NOTOTAL
END


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Member
posted Hide Post
That only gives a running total of the number of seats. I need a running total of Sales, Retail Cost and Dealer Cost for EACH Country.


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
Virtuoso
posted Hide Post
Here is a solution. There probably is something shorter...
  
-* File swamp01.fex
SET ASNAMES=ON
TABLE FILE CAR
SUM 
     SALES
     RETAIL_COST
     DEALER_COST
BY  COUNTRY
BY   SEATS AS 'SEATS' ROWS 2 OVER 4 OVER 5
IF COUNTRY NE FRANCE
ON TABLE HOLD AS H1
END
DEFINE FILE H1
SEATS/I6=EDIT(SEATS);
END
TABLE FILE H1
SUM 
SALES
COMPUTE TSALES/I6=IF COUNTRY NE LAST COUNTRY THEN SALES ELSE TSALES + SALES;
RETAIL 
COMPUTE TRETAIL/I6=IF COUNTRY NE LAST COUNTRY THEN RETAIL ELSE TRETAIL + RETAIL;
DEALER
COMPUTE TDEALER/I6=IF COUNTRY NE LAST COUNTRY THEN DEALER ELSE TDEALER + DEALER;
BY  COUNTRY
BY   SEATS 
ON TABLE HOLD AS H2
END
?FF H2
DEFINE FILE H2
GROUP/A20 = IF SEATS LE 2 THEN 'Up to 2 Seats' ELSE
IF SEATS LE 4 THEN 'Up to 4 Seats' ELSE
IF SEATS LE 5 THEN 'Up to 5 Seats';
END
TABLE FILE H2
SUM
TSALES TRETAIL TDEALER
BY GROUP
BY SEATS
ACROSS COUNTRY

ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=ACROSSVALUE,
     ACROSS=1,
     BACKCOLOR='WHITE',
$
ENDSTYLE
END


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

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Running group total with across

Copyright © 1996-2020 Information Builders