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] Sum a by group by highest 1

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Sum a by group by highest 1
 Login/Join
 
Silver Member
posted
I'm trying to sum a by group by highest 1. The code I'm using works when I display all rows; however I need to display the data by group. I don't want to write to a hold file because there are millions of rows. How can I mark the highest rows that need to be counted. I've tried using a define and compute but highest and max doesn't work in define and compute. I've played with last but I'm just not getting it. Example below of what I'm trying to get done:

DEFINE FILE ITEMS
DISCONT/I1=IF STAT EQ 'D' THEN 1 ELSE 0;
END

TABLE FILE ITEMS
SUM
STAT
DISCONT
BY TYPE
BY ITEM
BY HIGHEST 1 SEQ
END

I get the right results with the code above; however I need the data to display as follows:

DEFINE FILE ITEMS
DISCONT/I1=IF STAT EQ 'D' THEN 1 ELSE 0;
END

TABLE FILE ITEMS
SUM
DISCONT
BY TYPE
END

My count is high because it's no longer counting the highest 1. If I use the by I will have to hold data.

Any suggestions!

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8206
Exl2k
 
Posts: 36 | Registered: May 23, 2014Report This Post
Platinum Member
posted Hide Post
Starr, did you look into this post already?

post


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
 
Posts: 198 | Location: Amsterdam | Registered: August 24, 2011Report This Post
Master
posted Hide Post
Starr,

I'm not exactly sure what your saying here. But it seems that you just don't want to display SEQ. Did I understand that correctly.

If thats the case, then you just need to put NOPRINT after seq. It would look like this:

 DEFINE FILE ITEMS
DISCONT/I1=IF STAT EQ 'D' THEN 1 ELSE 0;
END

TABLE FILE ITEMS
SUM
STAT
DISCONT
BY TYPE
BY ITEM
BY HIGHEST 1 SEQ NOPRINT
END
 


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Silver Member
posted Hide Post
Yes I did ask similar question already and that's where I got the idea for HIGHEST 1. However, the data has to be aggregated BY TYPE. When using the BY ITEM and BY HIGHEST 1 SEQ I get multiple rows. I want one row per TYPE and I don't want to hold the file. So I was guessing that I have to use the HIGHEST 1 logic in a define or compute. Sorry I didn't ask in the earlier post but I didn't know there was so much data.


WebFOCUS 8206
Exl2k
 
Posts: 36 | Registered: May 23, 2014Report 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] Sum a by group by highest 1

Copyright © 1996-2020 Information Builders