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.
The cacluation is actually a percentage. That part is not the problem. What I am having a problem with is displaying the total percentage for the coffee category, then display the percentages for the sub-cats within Coffe. Doing what you have suggested would give me,
The tool doesn't work that way, but if you were to play fancy work with computes and hold files you might be able to do what you want. I don't have any exampes, never saw a need for that way.
Of course there are others out their that may have the answer at their fingertips, but they are probably sleeping now as they are in European countries.
Of course perhapsdefinining a blank sub-cat field might work as well. Will play with one of the IBI 'play files' and see.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Try summing the information separately and then matching and/or joining the information together. I had to use the CAR table to try to put together and example and then change to fields that would make sense for you...not sure it worked to well. I'm hoping you get the idea with the code below.
SET ASNAMES=ON
TABLE FILE COFFEESALE COUNT FIELD AS 'PERC1' AND COMPUTE SORT/A1 = 'A'; BY YEAR BY DEPT ON TABLE HOLD AS H001 END
TABLE FILE COFFEESALE COUNT FIELD AS 'PERC2' AND COMPUTE SORT/A1 = 'B'; BY YEAR BY DEPT BY CATEGORY ON TABLE HOLD AS H002 END
TABLE FILE COFFEESALE COUNT FIELD AS 'PERC3' AND COMPUTE SORT/A1 = 'C'; BY YEAR BY DEPT BY CATEGORY BY SUBCATEGORY ON TABLE HOLD AS H003 END
MATCH FILE H001 PRINT * BY SORT BY YEAR BY DEPT RUN
FILE H002 PRINT * BY SORT BY YEAR BY DEPT BY CATEGORY AFTER MATCH HOLD AS H005 OLD-OR-NEW RUN
FILE H003 PRINT * BY SORT BY YEAR BY DEPT BY CATEGORY BY SUBCATEGORY AFTER MATCH HOLD AS H005 OLD-OR-NEW END
DEFINE FILE H005 PERC/D7 = IF SORT EQ 'A' THEN PERC1 ELSE IF SORT EQ 'B' THEN PERC2 ELSE IF SORT EQ 'C' THEN PERC3 ELSE 0 END
TABLE FILE H005 SUM PERC BY DEPT BY CATEGORY BY SUBCATEGORY ACROSS YEAR END
Unfortunately it's much more complicated than it should be. If anyone knows an easier way, I'd love to see it!