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] Multiple COUNTS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Multiple COUNTS
 Login/Join
 
Gold member
posted
Tried this post earlier but had internet problem so I don't know if it made it. Sorry for the duplicate.

Customer wants to count ethnicity by gender and also count race by gender

  

--GENDER----ETHNIC----COUNT----RACE------COUNT
   M        HISP       5       AI-AK      1
            NON-HISP   2       AS         2
                               BL-AA      1
                               HI-PI      3
                               WH         1
                               ND         1


The following code of course results in (FOC020) THE SETS OF SORT PHRASES ARE INCONSISTENT

SUM CNT.ID
BY GENDER
BY ETHNICITY

SUM CNT.ID
BY GENDER
BY RACE



Is there a way to do multiple counts when the sort fields don't match?

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


Dev Studio /7.6.11/7.7.02M
MVS/USS
AIX/SOLARIS
Windows WF Client 7.6.8/7.6.11
 
Posts: 64 | Location: Eastern and middle NC | Registered: March 13, 2007Report This Post
Master
posted Hide Post
Does it really have to be in this layout?

SUM CNT.ID
BY GENDER
BY ETHNICITY
ACROSS RACE


Would do the trick nicely. Just add row and column-totals and you've got everything.


G'luck,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Platinum Member
posted Hide Post
SUM CNT.ID
BY GENDER
BY ETHNICITY

SUM CNT.ID
BY GENDER
BY ETHNICITY
BY RACE


Hold the data and then resort.


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Virtuoso
posted Hide Post
Something like this...
SUM CNT.ID/I5S AS count1
COMPUTE seq/I4=seq+1;
BY GENDER
BY ETHNICITY
...HOLD AS HOLD1...

SUM CNT.ID/I5S AS count2
COMPUTE seq/I4=seq+1;
BY GENDER
BY RACE
...HOLD AS HOLD2...

MATCH FILE HOLD1 PRINT ETHNICITY count1  BY seq BY GENDER
RUN
      FILE HOLD2 PRINT RACE count2  BY seq BY GENDER
AFTER MATCH HOLD AS HOLD3 OLD-OR-NEW

TABLE FILE HOLD3
PRINT 
ETHNIC
count1 AS COUNT
RACE
count2 AS COUNT
BY GENDER
BY seq NOPRINT
...


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 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     [CLOSED] Multiple COUNTS

Copyright © 1996-2020 Information Builders