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     subtiotal on alpha field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
subtiotal on alpha field
 Login/Join
 
Gold member
posted
I have an alpha field which contains 'X', i need tp know how many 'X's I have in each column. How do I do this as a subtotal?


WebFocus 7.6.6
Oracle 10
Windows XP
 
Posts: 60 | Registered: March 13, 2007Report This Post
Virtuoso
posted Hide Post
Jay

After 25 posts and registered since march 2007 you know what I mean if I say "signature"

The answer on your question:

TABLE FILE whatever
PRINT F_X 
COMPUTE TELLER/I4=IF F_X EQ 'X' THEN TELLER+1 ELSE TELLER; NOPRINT
FOOTING
"number of x: <TELLER "
ON TABLE COLUMN-TOTAL
END


I hope this works




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
Guru
posted Hide Post
I think this is what you are looking for COUNTRY is your filed containing X

TABLE FILE CAR
PRINT
COMPUTE A/I1 = IF COUNTRY EQ 'ENGLAND' THEN 1 ELSE 0;
BY COUNTRY
ON COUNTRY SUBTOTAL AS 'TOTAL :'
END


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Gold member
posted Hide Post
I want the total number of 'X's in the column otherwise I have to create a subfoor for the compute fields then align the columns (which is extremly hard to do).

Yout totals seems to work on numeric fields.

I am using webfocus 7.6.2


WebFocus 7.6.6
Oracle 10
Windows XP
 
Posts: 60 | Registered: March 13, 2007Report This Post
Virtuoso
posted Hide Post
I don't think your intended approach will work. There are subtotals that will work with alpha fields, but they are just that - subtotals - for an alpha field, that means the last value. You can also use the CNT. prefix, but that is just a count. You want to count only where a value equals 'X'. Could you just use a '1' instead of an 'X' and get what you need? Otherwise you'll need to define another column to subtotal or use in a footing/subfooting as Frank suggests.


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
Expert
posted Hide Post
Here's one way to determine the number of X's in each row for a particular column.

I'm using the CAR file as an example. I'm using 'O' instead of 'X' in this example.

The STRIP function removes the specified character from the given string. The ARGLEN function returns the non-trailing-spaces length of a string. Combine STRIP and ARGLEN to determine the count of the specified character.

DEFINE FILE CAR
XSTRIP/A24 = STRIP(24, MODEL, 'O', 'A24');
XCOUNT/D4 = ARGLEN(24, MODEL, 'I4') - ARGLEN(24, XSTRIP, 'I4');
END
TABLE FILE CAR
PRINT
MODEL
XCOUNT
END


You will, of course have to fiddle about with SUBFOOT if you don't want the Count column in the report.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     subtiotal on alpha field

Copyright © 1996-2020 Information Builders