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.
I am looking for some logic to display column7 row1 value(marked in red) is displayed in third row of a column 6 row3(marked in red) and column7 row 2 value(marked in green) is displayed in fourth row of a column6 row4(marked in green)
Thank you in advance.
Column1 Column2 Column3 Column4 Column5 Column6 Column7 1 T ABC -100 2500 2400 1 F XYZ 100 1000 900 2 T ABC 10 2400 2390 2 F XYZ 10 900 890This message has been edited. Last edited by: <Kathryn Henning>,
Have you tried running my code with the data you provide here? Don't think so, otherwise you would have seen that it also works for this new data set. It will work for any data set, provided it follows the same rule and layout.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I tried implementing your code but of no use... 3rd and 4th row is working but from 5th and 6th row its showing 3rd and 4th row values.
This is the code I used:- COMPUTE FIRST/I8 = IF XTRANS_NO NE LAST XTRANS_NO THEN NEW_TOTAL_PEND ELSE FIRST; COMPUTE SECOND/I8 = IF XTRANS_NO EQ LAST XTRANS_NO THEN NEW_TOTAL_PEND ELSE SECOND; COMPUTE NCOL6/I8 = IF XTRANS_NO GT '0001' AND XTRANS_NO NE LAST XTRANS_NO THEN LAST FIRST ELSE IF XTRANS_NO NE '0001' AND XTRANS_NO EQ LAST XTRANS_NO THEN LAST SECOND ELSE PENDING;
Output based on above code XTRANS_NO TRAN_FLG REGION FROM_OFFICE TO_OFFICE PEND_OUT FIRST SECOND NCOL6 00001 F 03 03-BALTIMORE_T21 Missing -10 12100 0 12110 00001 T 03 Missing 12-NHC BALTIMORE_T0T 10 12100 3397 3387 00002 F 03 03-BALTIMORE_T21 Missing -10 12100 3397 12100 00002 T 03 Missing 12-NHC BALTIMORE_T0T 10 12100 3397 3397 00003 F 03 03-BALTIMORE_T21 Missing -10 12100 3397 12100 00003 T 03 Missing 12-NHC BALTIMORE_T0T 10 12100 3397 3397
Required Output XTRANS_NO TRAN_FLG REGION FROM_OFFICE TO_OFFICE PEND_OUT PENDING NEW_TOTAL_PEND 0001 F 3 03-BALTIMORE_T21 Missing -10 12,110 12,100 0001 T 3 Missing 12-NHC BALTIMORE_T0T 10 3,387 3,397 0002 F 3 03-BALTIMORE_T21 Missing -20 12,100 12,080 0002 T 3 Missing 12-NHC BALTIMORE_T0T 20 3,397 3,417 0003 F 3 03-BALTIMORE_T21 Missing -40 12,080 12,040 0003 T 3 Missing 12-NHC BALTIMORE_T0T 40 3,417 3,457 0004 F 3 03-BALTIMORE_T21 Missing -10 12,040 12,030 0004 T 3 Missing 12-NHC BALTIMORE_T0T 10 3,457 3,467
Regards, SunilThis message has been edited. Last edited by: M A Sunil,
Sunil, I am not quite sure if I completely understood the problem but I have this sample code against CAR file that might help. TABLE FILE CAR PRINT COUNTRY CAR COMPUTE LAST_RETAIL/D12=LAST RETAIL_COST; NOPRINT COMPUTE LAST_LAST_RETAIL/D12=LAST LAST_RETAIL; NOPRINT COMPUTE LAST_COUNTRY/A50=LAST COUNTRY; NOPRINT COMPUTE LAST_LAST_COUNTRY/A50=LAST LAST_COUNTRY; NOPRINT COMPUTE NEW_DEALER_COST/D12 = IF LAST_LAST_COUNTRY EQ ' ' THEN DEALER_COST ELSE LAST_LAST_RETAIL; RETAIL_COST END