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 have a report that is calculating the total hours worked by store number and by region, group and district. I want to be able to add a column on the report that shows what the % of the total hours for each group that store is in.
I can't figure out how to add the computed field to determine the percentage of the total for the group on each store line.
Here is my code:
TABLE FILE T_PROD_LABTRANS SUM REGULARHRS BY REGION BY BSTGROUP BY BSTDIST BY SITEID
ON BSTGROUP SUBTOTAL AS 'TOTAL FOR GROUP ' WHERE ( ENTERDATE GE DT(2007-02-04 00:00:00) ) AND ( ENTERDATE LE DT(2007-08-08 00:00:00) ) AND ( CRAFT EQ 'BSTTECH' ) AND ( SITEID NOT LIKE 'S-%' ); WHERE TOTAL REGULARHRS NE .00; ON TABLE SET PAGE-NUM OFF ON TABLE SET BYDISPLAY ON ON TABLE SET EXPANDABLE ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K FORMULA ON TABLE SET COMPOUND 'BYTOC 2'
-* SET ASNAMES = ON -* TABLE FILE CAR SUM SALES AS 'CAR_SALES' BY COUNTRY BY CAR SUM SALES AS 'BT_SALES' BY COUNTRY BY CAR BY MODEL BY BODYTYPE ON TABLE HOLD AS HLD_SUM1 FORMAT ALPHA END -* ? HOLD HLD_SUM1 -* DEFINE FILE HLD_SUM1 BT_PCT/D6.1% = (BT_SALES / CAR_SALES) * 100; END -* TABLE FILE HLD_SUM1 PRINT BT_SALES BT_PCT BY COUNTRY BY CAR BY CAR_SALES BY MODEL BY BODYTYPE ON CAR SUBFOOT " " END
Jim
WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005
Did you get a chance to try Jim's suggestion? Many thanks to Jim's help.
Please try the following code as well:
DEFINE FILE CAR
RETAIL2/D6=RETAIL_COST;
END
TABLE FILE CAR
SUM RETAIL2 NOPRINT
BY COUNTRY
SUM RETAIL_COST
COMPUTE TOTINCOUNTRY/D10.4=100 * RETAIL_COST / RETAIL2;
BY COUNTRY SUBTOTAL
BY CAR
BY MODEL
ON TABLE NOTOTAL
END
The DEFINE for RETAIL2 is to create a unique fieldname to use in the COMPUTE.
Did you get a chance to try Jim's suggestion? Many thanks to Jim's help.
Please try the following code as well:
DEFINE FILE CAR
RETAIL2/D6=RETAIL_COST;
END
TABLE FILE CAR
SUM RETAIL2 NOPRINT
BY COUNTRY
SUM RETAIL_COST
COMPUTE TOTINCOUNTRY/D10.4=100 * RETAIL_COST / RETAIL2;
BY COUNTRY SUBTOTAL
BY CAR
BY MODEL
ON TABLE NOTOTAL
END
The DEFINE for RETAIL2 is to create a unique fieldname to use in the COMPUTE.