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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Subtotal, ST. compute field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Subtotal, ST. compute field
 Login/Join
 
Member
posted
Hi all,

I am trying to add a compute field which include a subtotal of a SUM field.

Example: ST.SALES

But WebFOCUS is giving me this error message.
"(FOC003) THE FIELDNAME IS NOT RECOGNIZED: ST.SALES"
and
"(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED:
ST.SALES"
I am using WebFOCUS 7.7.02

Does anyone know the reason?

This message has been edited. Last edited by: Henry,


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report This Post
Virtuoso
posted Hide Post
Henry,

ST. is only used in HEADINGs et al. with a caret for positioning.


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
Virtuoso
posted Hide Post
Where are you trying to use this? You can't use it in a compute.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
Thank you Danny and Prarie,

I was trying to use it as a prefix TOT. in the compute field. To calculate the % contribution based on the subtotal instead of the column total.

Now that I know I can't use it in the compute. I will figure another way to calculate it.

Thanks


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report This Post
Expert
posted Hide Post
TABLE FILE IBISAMP/CAR
SUM SALES AS STSALES {NOPRINT}
BY CAR
SUM SALES
AND COMPUTE SHARE/D8%=100* SALES / C1;
BY CAR
BY MODEL
ON TABLE SUMMARIZE
END
??




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Thank you Susannah!

That is what I wanted. Now I just have to modified the code with field names of my database.


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report This Post
Expert
posted Hide Post
TABLE FILE IBISAMP/CAR

SUM SALES
AND COMPUTE SHARE/D8%=100* SALES / (TOT.SALES);
BY CAR
BY MODEL
ON TABLE COLUMN-TOTAL
END
..this works, too




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Thank you again Susannah, but the new one calculate the % based on the grand total. Whereas the old code calculate the % based on the car brand, which is what I am looking for. Smiler


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report This Post
Expert
posted Hide Post
showing you use of word 'TOTAL'
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Thank you Susannah,

I have everything working now. But I want to add some columns to the right side of the table. I tried but couln't figure it out on my own.

Let say I want to add the following columns... What will be the code..
TOT.OH = Total on hand qty
IT.OH = In transit qty
ACT.OH = TOT.OH - IT.OH
TOT.OH % = same calculation as the Sales % cont, but using TOT.OH
ACT.OH % = same calculation as the Sales % cont, but using ACT.OH

TOT.OH      IT.OH      ACT.OH     TOT.OH %       ACT.OH %            


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report This Post
Member
posted Hide Post
Now I have the following code, but only the share 3 (ACT.OH %) is calculating correctly... Share and share 2 are giving me 0%

Where did I do wrong?

TABLE FILE INVENTORY_DAILY_SNAPSHOT
SUM v_last_week_sales AS 'STSALES' NOPRINT
SUM INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_OH AS 'STOH' NOPRINT
SUM v_act_OH AS 'STACT' NOPRINT
BY INVENTORY_DAILY_SNAPSHOT.STORES_INFO.DWD_STORES_CODE
SUM v_last_week_sales
AND COMPUTE SHARE/D8%=100 * v_last_week_sales / C1 ;
INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_OH
INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_ITR_STR_QTY
v_act_OH
COMPUTE Share2/D8%=100 * INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_OH / C2 ;
COMPUTE share3/D8%=100 * v_act_OH / C3 ;
BY INVENTORY_DAILY_SNAPSHOT.STORES_INFO.DWD_STORES_CODE SUBTOTAL 
BY INVENTORY_DAILY_SNAPSHOT.PRODUCTS_HIERARCHY_INFO.DWD_PRODUCTS_CLASS
ON TABLE PCHOLD FORMAT HTML
ON TABLE SUMMARIZE
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
END


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report This Post
Member
posted Hide Post
I added 3 more column to the right end of the table and none of the % cont column works now...

TABLE FILE INVENTORY_DAILY_SNAPSHOT
SUM v_last_week_sales AS 'STSALES' NOPRINT
SUM.INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_OH AS 'STOH' NOPRINT
SUM.v_act_OH AS 'STACT' NOPRINT
SUM v_last_week_sales
AND COMPUTE SHARE/D8%=100 * v_last_week_sales / C1 ;
INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_OH
INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_ITR_STR_QTY
v_act_OH
COMPUTE SHARE2/D8%=100 * INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_OH / C2 ;
COMPUTE SHARE3/D8%=100 * v_act_OH / C3 ;
COMPUTE v_sales_vs_tot_oh/D8%= SHARE - SHARE2 ;
COMPUTE v_tot_oh_wos/D12.1=INVENTORY_DAILY_SNAPSHOT.INVENTORY_INFO.DWF_INV_OH /v_last_week_sales ;
COMPUTE v_act_oh_wos/D12.1=v_act_OH /v_last_week_sales ;
BY INVENTORY_DAILY_SNAPSHOT.STORES_INFO.DWD_STORES_CODE RECOMPUTE 
BY INVENTORY_DAILY_SNAPSHOT.PRODUCTS_HIERARCHY_INFO.DWD_PRODUCTS_CLASS


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report This Post
Member
posted Hide Post
I figured out where my syntax error is, I am missing the BY statement before the SUM sales statement.

Now everything is working accordingly.


WebFOCUS 7.7.02
Windows, All Outputs
 
Posts: 20 | Registered: June 12, 2012Report 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     [SOLVED] Subtotal, ST. compute field

Copyright © 1996-2020 Information Builders