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]How to select value from second row after grouping

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to select value from second row after grouping
 Login/Join
 
Member
posted
I have requirement where I need to display the change in price in percentage and then display one row for that type. Below is my data

PRC_TYP PRICE DATE
ASKED 26.55 24-FEB-15
ASKED 26.55 05-MAR-15


After I execute the code below (I have excluded date on purpose)

TABLE FILE PRICE_TOLERANCE_HOLD_NEW
PRINT
COMPUTE GROUP/I9 = IF (LAST GROUP EQ 0) THEN 1 ELSE IF (PRC_TYP EQ LAST PRC_TYP) THEN (LAST GROUP) ELSE (LAST GROUP + 1);
COMPUTE PERCENTAGE/P6.2= (PRICE - LAST PRICE)/PRICE;
BY PRC_TYP

I am getting the data below. What I want to do after this is that I want to display only 1 row (BY GROUP) but I want to display the percentage value of the second row (as first row try to get percentage value using 0). Is this possible? Or is there a better solution?

PRC_TYP GROUP PERCENTAGE PERCENTAGE
ASKED 1 1.00
ASKED 1 .00

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8.0.0.9
Linux 2.6.32-220.el6.x86_64
 
Posts: 9 | Registered: March 23, 2015Report This Post
Virtuoso
posted Hide Post
WHERE TOTAL GROUP EQ LAST GROUP;
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
and it works! thanks.

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


WebFOCUS 8.0.0.9
Linux 2.6.32-220.el6.x86_64
 
Posts: 9 | Registered: March 23, 2015Report 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]How to select value from second row after grouping

Copyright © 1996-2020 Information Builders