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     [SOLVED] Division of record count
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Division of record count
 Login/Join
 
Member
posted
I'm trying to create the following compute:

(( CNT.IsCertified + CNT.NOT_CERTIFIED) / ( CNT.ROSTERID - CNT.IsReleased)) * 100

Even though the counts of the fields are greater than 0, I always get a 0 back. I think it has something to do with the field type, but not sure how to fix it. Tried changing the IsCertified, NOT_CERTIFIED, IsReleased to Decimal, but it didn't help.

Thanks

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.0.7
Windows, All Outputs
 
Posts: 18 | Registered: November 25, 2013Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi AmiSol,
check if following code helps, else if you could provide some sample code using car file

TABLE FILE CAR
SUM
COMPUTE PCT/D10.2%=(CNT.CAR +CNT.COUNTRY) / (CNT.MODEL-CNT.CAR) * 100;
BY COUNTRY
END


WF 8.1.04,Infoassist,Oracle, Excel, PDF,HTML.
 
Posts: 82 | Registered: January 06, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Ami,

What is the format of your result field?


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

 
Posts: 1936 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
CNT. is going to give you I5.
look at each variable's content separately, and you'll be able to figure out why the formula is giving you an undesired results. do the basic research.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Member
posted Hide Post
susannah-I'm new to WebFocus - is there a way to convert the data type of a formula from I5 to decimal from the expression editor pane?


WebFOCUS 8.0.7
Windows, All Outputs
 
Posts: 18 | Registered: November 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
i have no idea what an expression editor pane is, but sure. easy. just a define, as in jvb's example. but first you have to do your research, what do these 4 fields actually contain? print out each of them and just look.
CNT.IsCertified
CNT.NOT_CERTIFIED
CNT.ROSTERID
CNT.IsReleased




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Member
posted Hide Post
ok, I figured it out - I had to remove the cnt. from the fields as they were define fields and the aggregation takes place on the report (sum).


WebFOCUS 8.0.7
Windows, All Outputs
 
Posts: 18 | Registered: November 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Division of record count

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