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     compute results in leading zeroes?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
compute results in leading zeroes?
 Login/Join
 
Master
posted
I have a compute of
COMPUTE MARGIN_BP/A15 = EDIT((((PROJECTED_MARGIN)/PROJECTED_SALES)) - (((EXT_SALES_DOLLARS - EXT_ACT_COST)/EXT_SALES_DOLLARS)) * 1000) | 'bp'; AS 'Margin,BP % to Goal'

that give me results like this
000000289bp
it seems to pad the result with leading zeroes. Is there a way to avoid this?


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
Why is Margin_BP Alpha? oh never mind I see why...


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Master
posted Hide Post
I'm concatenating the 'bp' to the end of it.
nobody ever came up with a fancy symbol for basis points, but they really should have. Wink


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
You are getting the zeros because you are using the edit command. Is the 'bp' a must have for you? If so why not print the amount not changed and try a field containing the 'bp' in it printed at +0 of the other field?


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
Use the FTOA function:
TABLE FILE CAR
PRINT
COMPUTE MARGIN_BPN/D12 = (((SALES)/SEATS)) - (((DEALER_COST - RETAIL_COST)/DEALER_COST)) * 1000; NOPRINT
COMPUTE MARGIN_BP/A17 = FTOA(MARGIN_BPN, '(D12)', 'A15') | 'bp'; AS 'Margin,BP % to Goal'
END

I used two computes to get the result you want because I was getting an error with this:
TABLE FILE CAR
PRINT
COMPUTE MARGIN_BP/A15 = EDIT((((SALES)/SEATS)) - (((DEALER_COST - RETAIL_COST)/DEALER_COST)) * 1000) | 'bp'; AS 'Margin,BP % to Goal'
END

(FOC276) THE FIRST ARGUMENT OF 'EDIT' MUST BE A FIELDNAME


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
You done it Tom Flynn!

I had to make it two computes (one compute and it had no output at all)

COMPUTE MARGIN_BPX/A15 = EDIT((((PROJECTED_MARGIN)/PROJECTED_SALES)) - (((EXT_SALES_DOLLARS - EXT_ACT_COST)/EXT_SALES_DOLLARS)) * 1000) | 'bp'; AS 'Margin,BP % to Goal' NOPRINT
COMPUTE MARGIN_BP/A15 = TRIM('L',MARGIN_BPX,15,'0',1,'A15'); AS 'Margin,BP % to Goal'

I am giving Mr. Flynn 3,000,000 of my focal points. of course, they aren't worth anything (though, I think they may have a millionth of a penny street value?), but you have my admiration and respect.

thanks again!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report 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     compute results in leading zeroes?

Copyright © 1996-2020 Information Builders