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     FORMAT EXL2K FORMULA rounding problem
Go
New
Search
Notify
Tools
Reply
  
FORMAT EXL2K FORMULA rounding problem
 Login/Join
 
Expert
posted
has anyone been able to use
ON TABLE PCHOLD FORMAT EXL2K FORMULA
where the result of the compute has to be integer?
IT DOESN'T WORK! I NEED A WORK AROUND REAL BAD.
COMPUTE NEW/I8=OLD * SHARE; where share is some percentage.
The calculation statement comes out ok, but the cell format is not General or Number with no zeros...the cell format ..get this... is custom #;-#; which means 1. no negatives show and 2. the underlying value carries decimals even tho it doesn't display them. The COMPUTE statement cant use the ROUND function because ROUND isnt supported in webfocus (!)
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
See if this helps.

TABLE FILE CAR
SUM DEALER_COST
COMPUTE DEALER_PCT/D9.2 = DEALER_COST * .0125;
COMPUTE DEALER_PCT1/I8 = DEALER_PCT;
COMPUTE NODECPLACES/D9 = DEALER_PCT * 100;
COMPUTE DECPLACES/A2 = EDIT(NODECPLACES,'$$$$$$$99');
COMPUTE DEALER_PCT2/I8 = IF DECPLACES GE '50' THEN DEALER_PCT1 + 1 ELSE
DEALER_PCT1 + 0;
COLUMN-TOTAL
BY COUNTRY
BY CAR
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT DEALER_COST
DEALER_PCT
DEALER_PCT1
DEALER_PCT2
COLUMN-TOTAL
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT EXL2K FORMULA
END
 
Posts: 188 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
/I8 is still carried in excel with decimal values. Which is horrid.
and any interim fields needed to address that issue, as you suggest, can't be automatically Hidden. What i want is a way to write a character string that excel will evaluate as an executable statement.
Then i can do the ROUNDDOWN excel function.
I have to produce a clean working sheet.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Guru
posted Hide Post
I tried the following ...

TABLE FILE EMPDATA
PRINT

SALARY
COMPUTE BONUS/D9.7 = .0173298;
COMPUTE
CALCI1/I8 =(SALARY * BONUS);

COMPUTE
CALCI2/I8 =INT(SALARY * BONUS);

BY PIN
ON TABLE HOLD AS TESTXL FORMAT EXL2K FORMULA
END


As an example this is what shows in the .xht file


X:NUM class=xl100r x:fmla="=$B9 *$C9 ">752 .../TD
X:NUM class=xl100r x:fmla="=TRUNC(($B9 *$C9 ))">752 .../TD
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
so, you're saying use an INT operator? hmm. very intetesting. i'll try it tomorrow. thanks.
aha! worked great! thank you.
COMPUTE NEW/I8S=INT(field1 * field2 + .499)
works.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     FORMAT EXL2K FORMULA rounding problem

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