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.
So I don't know if I am going about this the wrong way but here's my scenario, looking for an idea of how to execute. I am thinking to somehow create a define that labels each row but then it would have to break based on the Part Number? Is that possible?
I have quotes for parts, my user wants an across of most recent four quotes listed by part number.
Data Received Part Number, Quote Date, Quote Amount Part A, 1/3/2015, 10 Part A, 1/2/2015, 11 Part A, 1/1/2015, 15 Part A, 12/31/2014, 12 Part A, 12/30/2014, 13 Part B, 1/3/2015, 20 Part B, 1/2/2015, 21 Part B, 1/1/2015, 25 Part B, 12/31/2014, 22 Part B, 12/30/2014, 23
Expected Result: Part Number, Quote Amount by most recent four dates
---------------------------------------------------------------------------------------- Part Number | Date 1 | Price 1 | Date 2 | Price 2 | Date 3 | Price 3 | Date 4 | Price 4 ---------------------------------------------------------------------------------------- Part A | 1/3/2015 | 10 | 1/2/2015 | 11 | 1/1/2015 | 15 | 12/31/2014 | 12 Part B | 1/3/2015 | 20 | 1/2/2015 | 21 | 1/1/2015 | 25 | 12/31/2014 | 22
Whilst Ram has given you a starting point, what it doesn't cover is that you want these as an across. Neither does it hint at the problems that you will encounter if the last 4 quote dates for each individual quote are not the same.
Use Rams code as a base to sort your quotes by part by highest date, but add an additional COMPUTE to number the occurrences of the quote so that you can a) restrict the number of dates held and b) order them correctly in your subsequent ACROSS -
SUM QUOTE
COMPUTE Q_INDX/I4 = IF PART NE LAST PART THEN 1 ELSE Q_INDX + 1;
BY PART
BY HIGHEST DATE
WHERE TOTAL Q_INDX LE 4
ON TABLE HOLD AS TEMPHLD1
END
-RUN
TABLE FILE TEMPHLD1
SUM DATE
QUOTE
BY PART
ACROSS Q_INDX NOPRINT
.....
This will give you an idea of how you might code this type of request but may need more work on this basic example.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
If we've saved your sanity then that is mission accomplished.
Of course, if you wish to increase my caffeine levels then you can always try and locate me at one of the Summits (not the US one this year though - just the UK).
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004