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] Finding out a total for a ROW for only negative values.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Finding out a total for a ROW for only negative values.
 Login/Join
 
Member
posted
I need to compute the a total for each row but only the negative values. In the example below, part AAAA does not have negative values in OH1 and OH2 so the total is 0 (or null). l if possible). Part BBBB has negative values in OH1 and OH2 is -5. Part CCCC has only one negative value in OH1 so the total is -4. Part DDDD has a negative value OH2 so the total is -03. I included the leading zeros in the example below just to keep the formatting. I have also included only two OHx fields but my report has 8 OHx fields.

Part OH1 OH2 TOT
AAAA 005 001 000
BBBB -03 -02 -05
CCCC -04 005 -04
DDDD 006 -03 -03

I appreciate your help.

Petter

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


WebFocus 7703
Windows, All Outputs
 
Posts: 11 | Registered: November 09, 2012Report This Post
Virtuoso
posted Hide Post
Maybe something like this:

TABLE FILE xxxx
 SUM/PRINT
  OH1
  OH2
  OH3
  .
  .
  .
  COMPUTE OH1X/D9 = IF (OH1 LT 0) THEN OH1 ELSE 0 ;  NOPRINT
  COMPUTE OH2X/D9 = IF (OH2 LT 0) THEN OH2 ELSE 0 ;  NOPRINT
  COMPUTE OH3X/D9 = IF (OH3 LT 0) THEN OH3 ELSE 0 ;  NOPRINT
  .
  .
  .
  COMPUTE TOT/D9 MISSING ON = IF   (OH1X + OH2X + OH3X + .....) EQ 0 THEN MISSING
                              ELSE (OH1X + OH2X + OH3X + .....);
 BY PART
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Thank you! It did work!


WebFocus 7703
Windows, All Outputs
 
Posts: 11 | Registered: November 09, 2012Report 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] Finding out a total for a ROW for only negative values.

Copyright © 1996-2020 Information Builders