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.

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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
summarize and .TOT
 Login/Join
 
Member
posted
howdy there, im strugglin to get WF to summarize correctly, on my table file im calculating the proportion of the total sales, on the field
COM_MIX_RTL is working fine on all the iterations but it looks like im doing something wrong on the table summarize as is giving a weird result, I tried printing the TOT.RTL_COM_TY as new computer var and it looks that it will sum it for each iteration on the summarize statement, is there a way to hold the same value for TOT.RTL_COM_TY even on the summarize statement?


  
TABLE FILE FF_CATDECK_SALES_SS
SUM
RTL_COM_TY/D12
COMPUTE RTL_CHG_COM/D12.3= IF RTL_COM_TY = 0 THEN 0 ELSE IF RTL_COM_LY = 0 THEN 0 ELSE (RTL_COM_TY-RTL_COM_LY)/RTL_COM_LY;
QTY_COM_TY
COMPUTE QTY_CHG_COM/D12.3= IF QTY_COM_TY = 0 THEN 0 ELSE IF QTY_COM_LY = 0 THEN 0 ELSE (QTY_COM_TY-QTY_COM_LY)/QTY_COM_LY;
COMPUTE COM_AVG_RTL_TY/D12.2= RTL_COM_TY/QTY_COM_TY;
COMPUTE COM_AVG_RTL_LY/D12.2= RTL_COM_LY/QTY_COM_LY;
COMPUTE COM_GM_TY/D12.4= (RTL_COM_TY-COST_COM_TY)/RTL_COM_TY;
COMPUTE COM_GM_LY/D12.4= (RTL_COM_LY-COST_COM_LY)/RTL_COM_LY; NOPRINT
COMPUTE COM_GM_CHG/D12B =  (COM_GM_TY - COM_GM_LY ) *10000; 
COMPUTE COM_MIX_RTL/D12= RTL_COM_TY/TOT.RTL_COM_TY*100;
WHERE SUB_CATEGORY IN ('cat1','cat2','cat4','cat5')
BY SUB_CATEGORY
ON TABLE SUMMARIZE
END



WebFocus 768
Windows, all output
 
Posts: 18 | Registered: June 20, 2011Report This Post
Virtuoso
posted Hide Post
Raphael,

What SUMMARIZE does is sums all fields in the COMPUTE expressions and then reuse the expressions with the totaled fields. Hence the problem you experienced.
The only elements that are not summed are constants. So, I suggest the following, using the CAR file as an example:
  
TABLE FILE CAR
SUM TOT.SALES
ON TABLE HOLD AS TS FORMAT ALPHA
END
-RUN
-READFILE TS
TABLE FILE CAR
SUM SALES/D10
COMPUTE TSALES/D10=SALES / &SALES * 100;
BY COUNTRY
ON TABLE SUMMARIZE  
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Hello Danny, I was using that work around before but was expecting this could be done in one step, I guess is not possible, thanks anyway!


WebFocus 768
Windows, all output
 
Posts: 18 | Registered: June 20, 2011Report This Post
Virtuoso
posted Hide Post
Single step with multi-verb:

TABLE FILE CAR
 SUM SALES/D10 NOPRINT
 SUM SALES/D10
 COMPUTE TSALES/D10 = SALES / C1 * 100;
 BY COUNTRY
 ON TABLE SUMMARIZE
END

Or....

DEFINE FILE CAR
 TOT_SALES/D10 = SALES ;
END
-*
TABLE FILE CAR
 SUM TOT_SALES  NOPRINT
 SUM SALES/D10
 COMPUTE TSALES/D10 = SALES / TOT_SALES * 100;
 BY COUNTRY
 ON TABLE SUMMARIZE
END

Or....

TABLE FILE CAR
 SUM COMPUTE TOT_SALES/D10 = SALES; NOPRINT
 SUM SALES/D10
 COMPUTE TSALES/D10 = SALES / TOT_SALES * 100;
 BY COUNTRY
 ON TABLE SUMMARIZE
END

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Dan thank you this kinda does what I want except that this will cause the 2 line on total issue


WebFocus 768
Windows, all output
 
Posts: 18 | Registered: June 20, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders