Db2

Db2

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Rounding Up in Summary Compute

    Posted Wed September 16, 2020 11:57 AM

    I need the result of a summary compute equation to round up, like the ROUNDUP formula in Excel. I can't find that formula in WebQuery. Is there one?






    #Db2
    #Support
    #SupportMigration


  • 2.  RE: Rounding Up in Summary Compute

    Posted Fri January 15, 2021 11:52 PM

    Assuming you are trying to do a round up of SUM of an Amount field:

    IF SUM.Amount GT 0 AND SUM.Amount NE INT(SUM.Amount) THEN INT(SUM.Amount + 1) ELSE INT(SUM.Amount)

    In words: if the number is greater than 0 and is not an integer then add 1 and drop decimals, else just drop decimals.

    1.2 -> 2

    -2.3 -> -2

    3 -> 3






    #Db2
    #Support
    #SupportMigration


  • 3.  RE: Rounding Up in Summary Compute

    Posted Fri January 28, 2022 05:49 PM

    Hi Dave,

    This functionality is available in the latest group PTF level of Web Query V2R3M0 in the Designer tool. You can right click a field, choose Add Calculation, click the FX button, then find the ROUND function under the Numeric category.






    #Db2
    #Support
    #SupportMigration