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) Percent Row-Total

Read-Only Read-Only Topic
Go
Search
Notify
Tools
(Solved) Percent Row-Total
 Login/Join
 
Virtuoso
posted
I'm having a Brain Freeze on this.
If you run the code below. I need the OT_Hours to be an average of the two, not total. For instance the row-total needs be the average of the total percent… 14% not the total 29%.
 TABLE FILE CAR
SUM
     SALES AS 'Reg Hrs' OVER
     DEALER_COST AS 'Reg Pay' OVER
COMPUTE  OT_Hours /D10.2%=(C1/C2)/ 100; AS 'OT Hours %' 
  ACROSS CAR
WHERE CAR EQ   'DATSUN' OR 'TOYOTA'
ON TABLE ROW-TOTAL  
END
 

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


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
It does that using BY and RECOMPUTE, as I'm sure you know.
TABLE FILE CAR
SUM  SALES AS 'Reg Hrs' 
     DEALER_COST AS 'Reg Pay' 
     COMPUTE  OT_Hours /D10.2%=(C1/C2)/ 100; AS 'OT Hours %'
BY   CAR
WHERE CAR EQ   'DATSUN' OR 'TOYOTA'
ON TABLE RECOMPUTE
END

Actually I've no idea how to do that with ACROSS... Feeling pretty stupid here ... Maybe ask Art or Noreen ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Prarie,

On the fly:
  
-* File prarie02.fex
 TABLE FILE CAR
SUM
     SALES AS 'Reg Hrs' 
     DEALER_COST AS 'Reg Pay' 
COMPUTE  OT_Hours /D10.2%=(C1/C2)/ 100; AS 'OT Hours %' 
  ACROSS CAR
COMPUTE TSALES/I5= C1 + C4; AS 'Total Reg Hrs'
COMPUTE TDCOST/D7= C2 + C5; AS 'Total Reg Pay'
COMPUTE TOT_HOURS/D10.2%= (C3 + C6)/2; AS 'Ave OT Hours %'
WHERE CAR EQ   'DATSUN' OR 'TOYOTA'
-*ON TABLE ROW-TOTAL  
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
Virtuoso
posted Hide Post
Yes Gamp...I've been feeling a bit stupid too.

Danny - that is a good solution, but in my actual report it's across Months...so you would never know how many months until someone chose a date range.

Any other ideas?
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
this is better... ACROSS-TOTAL

TABLE FILE CAR
SUM
SALES AS 'Reg Hrs' OVER
DEALER_COST AS 'Reg Pay' OVER
COMPUTE OT_Hours /D10.2%=(C1/C2)/ 100; AS 'OT Hours %'
ACROSS CAR ACROSS-TOTAL
WHERE CAR EQ 'DATSUN' OR 'TOYOTA'
ON TABLE RECOMPUTE
END
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
  
TABLE FILE CAR
SUM
SALES AS 'Reg Hrs' OVER
DEALER_COST AS 'Reg Pay' OVER
COMPUTE OT_Hours /D10.2%=(C1/C2)/ 100; AS 'OT Hours %'
ACROSS CAR
WHERE CAR EQ 'DATSUN' OR 'TOYOTA'
ON CAR RECOMPUTE MULTILINES AS 'avg'
ON TABLE ROW-TOTAL
END
  


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
Virtuoso
posted Hide Post
RRKen - workin on the railroad?

This worked for me.

TABLE FILE CAR
SUM
SALES AS 'Reg Hrs' OVER
DEALER_COST AS 'Reg Pay' OVER
COMPUTE OT_Hours /D10.2%=(C1/C2)/ 100; AS 'OT Hours %'
ACROSS CAR ACROSS-TOTAL RECOMPUTE
WHERE CAR EQ 'DATSUN' OR 'TOYOTA'
END
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
all the live long day....
Ginny Jakes old gig at BNSF since January


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
Virtuoso
posted Hide Post
I was there in 2004 when they were just getting WebFocus...working over in Safety.

wonder how ole Ginny is doin?
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
quote:

TABLE FILE CAR
SUM
SALES AS 'Reg Hrs' OVER
DEALER_COST AS 'Reg Pay' OVER
COMPUTE OT_Hours /D10.2%=(C1/C2)/ 100; AS 'OT Hours %' 
ACROSS CAR ACROSS-TOTAL RECOMPUTE
WHERE CAR EQ 'DATSUN' OR 'TOYOTA'
END  


I agree. Much nicer.


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
  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) Percent Row-Total

Copyright © 1996-2020 Information Builders