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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
Hey evryone, I am working on a report where I want to have my computed fields recalculated at the subtotal and total breaks. Below is the code I was attempting to use but it doesn't quite work, it(commented lines) puts the computed values on separate lines follwing the data. They should be every fourth and fifth column on the subtotal line. Any one know how to make this work?
ON PARENT SUBTOTAL TY_WTD PL_WTD LY_WTD TY_MTD PL_MTD LY_MTD TY_STD PL_STD LY_STD TY_WES PL_WES LY_WES AS 'TOTAL SALES:' -*ON PARENT COMPUTE PL%/D5.2 = IF TY_WTD NE 0 THEN ABS(TY_WTD - PL_WTD) / PL_WTD * 100 ELSE 0; AS ' ' -*ON PARENT COMPUTE LY%/D5.2 = IF LY_WTD NE 0 THEN ABS(TY_WTD - LY_WTD) / LY_WTD * 100 ELSE 0; AS ' ' ON TABLE COLUMN-TOTAL AS 'GRAND TOTAL:' TY_WTD PL_WTD LY_WTD TY_MTD PL_MTD LY_MTD TY_STD PL_STD LY_STD TY_WES PL_WES LY_WES This message has been edited. Last edited by: <Mabel>,
You can use the SUMMARIZE and RECOMPUTE commands instead of SUB-TOTAL and SUBTOTAL to recalculate the result of a COMPUTE command. SUMMARIZE is similar to SUB-TOTAL in that it recomputes values at every sort break. RECOMPUTE is similar to SUBTOTAL in that it recalculates only at the specified sort break.