Focal Point Banner


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 myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     COMPUTED Fileds ON SUBTOTAL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
COMPUTED Fileds ON SUBTOTAL
 Login/Join
 
Platinum Member
posted
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>,
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
<Pietro De Santis>
posted
Check out SUMMARIZE and RECOMPUTE in the manual.

Recalculating Values for Subtotal Rows

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.
 
Report This Post
Platinum Member
posted Hide Post
Thanks Pietro, yet again you saved me.
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     COMPUTED Fileds ON SUBTOTAL

Copyright © 1996-2020 Information Builders