Round Function in Derived column transformation

  • Can somebody please help me with the implementation of a logic in round off to the left of a decimal point.

    Something like this in excel "=ROUND(x/12*31%,-2)" is to be implemented in SSIS. The Round function in the derived column is not permitting -2 for the length parameter. Please help

    Value x ExcelSSIS

    627900 16200 16221

    187000 4800 4831

    277760 7200 7175

    763000 19700 19711

    1387500 35800 35844

    1465200 37900 37851

    2725000 70400 70396

    292800 7600 7564

    317200 8200 8194

    The table lists the values for X in the formula and the respective result calculated by Excel. I would want SSIS to give the same results like excel is giving. Please help me to make it work.

  • did you try % operator?

  • Can u please explain about the significance of the use of modulo operator here. I did think of the over head to implement the logic of deducing the last two digits by division principle then checkin the second digit from last to see if it is from 0-5 or 6-9 and then accordinglyu updating the third digit from the last is like...... %$$^&$#%^*&^$&#$#$*%^$%(*%%# in BI. if there is no other possibility i guess would have to do this only. but would better using excel itself would be easier for my clients.

  • *** Please Excuse the language Errors here***

  • Would this be what you're looking for ?

    select ROUND(ROUND(277760/12*31,0)/10000,0)*100

    [font="Verdana"]Markus Bohse[/font]

  • round() t-sql function accepts negative length parameter

  • I am handling data sources from excel. There is no SQL database involved for me to try running the query on any table. I am Using Derived column to calculate the value X in the dataflow from Excel source only.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply