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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Count Distinct
 Login/Join
 
Gold member
posted
Here's a nice equivalent to Oracle
"count(distinct fieldname || fieldname)"
for when you need to know how many unique combinations of two fields are in a dataset.

It concatenates the values of the two fields in a DEFINE, then uses SUM CNT.DST to get the count of distinct combinations. Note that the result is defined as I/9, else it returns ***** as a value.


DEFINE FILE EXAMPLETABLE
CONCAT_FIELDS/A70 = FIELD1 || FIELD2;
END
TABLE FILE EXAMPLETABLE
SUM CNT.DST.CONCAT_FIELDS/I9
END

Sorry - I didn't figure this out for CAR, but am sure it could be done there. I'm putting this entry in for next time I need it and can't remember/find what I did!

Thanks to an entry in the IBI TechSupport for the basic idea, which I extended to use a concatenated DEFINE.

Cheers!
 
Posts: 64 | Location: Denver | Registered: July 20, 2005Report This Post
Virtuoso
posted Hide Post
But use weak catenation:
CONCAT_FIELDS/A70 = FIELD1 | FIELD2;

lest rows like
field1  field2
======  ======
A       BC 
AB      C
be confounded.


- 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


Copyright © 1996-2020 Information Builders