Where and how to round

      Where and how to round

      Hello,

      I have a sales cube and want to export some of the data into a MS-SQL Database. The issue is that because I have the sales broken down into months by percentages I end up with a lot of decimal places (e.g. 123,456789) .

      The SQL Database expects only two decimal place (e.g. 123,45). What is the best way to achieve the rounding? Can I do it already when Extracting from the cube, or with a Transform (which would you recommend) or is there a way to achieve this during the load process?

      Thanks,
      Tobias

      laloune wrote:

      you can also round directly in the SQL query using ROUND(<value>,<decimal places>)


      Data source is a olap cube not a relational database. Extracts from a cube doesn't offers the ability to modify (round) data. And you can't enter a SQL query using a relational load. Using a Field transform seem to be the best way to round values in this case.

      Regards
      Andreas
      Andreas Mueller
      FORECAST Unternehmensplanungen GmbH, Berlin, Germany
      www.forecast.de
      Thanks a lot for the replies!

      Before going the route with the field transforms I tested another way:
      I just loaded the numbers without rounding into the SQL Server Database and the database could handle the load despite the fact, that the field was defined to have only two decimal places. I am not sure whether it just cut the decimals or did a rounding, but for my purpose that is not relevant. I just wanted to make sure not to fill the database with useless decimals or to have formatting issues later on.

      Regards,
      Tobias