September 26, 2007, 02:06 PM
Jason K.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.
September 26, 2007, 02:23 PM
LeahYou 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?
September 26, 2007, 02:30 PM
Francis MarianiUse 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
September 26, 2007, 02:34 PM
Jason K.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!