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     FORMAT EXL2K FORMULA rounding problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
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, 2003Report 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: 189 | Location: pgh pa | Registered: October 06, 2004Report 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, 2003Report 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, 2003Report 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, 2003Report 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     FORMAT EXL2K FORMULA rounding problem

Copyright © 1996-2020 Information Builders