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     [SOLVED] Across Columns with all-inclusive across-total

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Across Columns with all-inclusive across-total
 Login/Join
 
Guru
posted
Hi,
Just a little confused here. I was hoping to have a report that has a filtered across columns but then the total shows all the values without the filter. I tried the following code:

TABLE FILE CAR
SUM
     DEALER_COST AS 'TOTAL,DEALER COST'
BY SEATS
SUM
     DEALER_COST AS ''
ACROSS BODYTYPE COLUMNS 'COUPE' AND 'HARDTOP'
BY SEATS
ON TABLE PCHOLD FORMAT HTML
END
-EXIT


But, Total Dealer Cost still only adds up Coupe and Hardtop instead of all bodytypes.

How do I do this?

WF 7.1.4

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


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Virtuoso
posted Hide Post
bit confusing result but you should do it in two steps.

-* File acrossColumns.fex
SET ASNAMES=ON
DEFINE FILE CAR
DUMMY/A1='';
END
TABLE FILE CAR
SUM
     DEALER_COST AS 'ALLES'
	 BY DUMMY
ON TABLE HOLD AS HOLD1 FORMAT FOCUS INDEX DUMMY
END

TABLE FILE CAR

SUM DEALER_COST
BY DUMMY
BY SEATS
BY BODYTYPE
WHERE BODYTYPE EQ 'COUPE' OR 'HARDTOP';
ON TABLE HOLD AS HOLD2 FORMAT FOCUS INDEX DUMMY
END
-RUN

JOIN
 LEFT_OUTER HOLD2.SEG01.DUMMY IN hold2 TO MULTIPLE HOLD1.SEG01.DUMMY IN hold1
 AS J0
 END
TABLE FILE HOLD2
SUM
     DEALER_COST
BY ALLES AS 'TOTAL,All,Bodytypes'
BY SEATS
ACROSS BODYTYPE
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML

END




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
<JG>
posted
for what you are looking for in this case, a simple define and no across will do.

DEFINE FILE CAR
COUPE/D12= IF BODYTYPE EQ 'COUPE' THEN DEALER_COST ELSE 0;
HARDTOP/D12= IF BODYTYPE EQ 'HARDTOP' THEN DEALER_COST ELSE 0;
END

TABLE FILE CAR
SUM
DEALER_COST AS 'TOTAL,DEALER COST'
COUPE
HARDTOP
BY SEATS
ON TABLE PCHOLD FORMAT HTML
END
 
Report This Post
Virtuoso
posted Hide Post
As always...more than one solution!




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
Master
posted Hide Post
Interesting, I started to post my response, which is almost exactly the same as Frank's and discovered two new responses. Both are right, but they give different outputs.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report 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     [SOLVED] Across Columns with all-inclusive across-total

Copyright © 1996-2020 Information Builders