Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     COMPUTED Fileds ON SUBTOTAL
Go
New
Search
Notify
Tools
Reply
  
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, 2004Reply With QuoteReport 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.
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks Pietro, yet again you saved me.
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

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

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.