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 trying to pull active records from a table and I need the most current date. There may be more than one active record for a person and as it stands the report is just pulling one. Is it possible to set it to pull the most current? However, I noticed that the most current may not be the last record for each person (so they are not stored in date order).
You can use BY HIGHEST 1 datefield. However make sure your placement of the BY is correct as the following example against the GGSALES file.
Note that the first table request holds data with a random number so that I can randomly leave out data from the reports.
The second report shows the data with the data holding a random number less than zero removed.
The third report shows what you are after and you can verify this against the second report.
TABLE FILE GGSALES
SUM DOLLARS
COMPUTE Rdm_Numb/D12.2 = RDNORM('D12.2');
BY ST
BY REGION
BY DATE
WHERE DATE FROM '01011996' TO '31121997'
ON TABLE HOLD AS HGGSALES
END
-RUN
TABLE FILE HGGSALES
SUM DOLLARS
BY ST
BY REGION
ACROSS DATE
WHERE Rdm_Numb GE 0
END
-RUN
TABLE FILE HGGSALES
SUM DOLLARS
BY ST
BY REGION
BY HIGHEST 1 DATE
WHERE Rdm_Numb GE 0
END
-RUN
Enjoy
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
I usually use a sort on a date with the BY HIGHEST and compute a value for a WHERE TOTAL test when there is no other way. Other selection present of course so you don't pull the entire data. Of course you could select on MAX.date, however doesn't mean the other data would tie to the date.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004