How to round up large Number in appian

Certified Senior Developer

I want to roundup below result to ...upto two places like 3.13....how could i achieve that

please help

  Discussion posts and replies are publicly visible

Parents
  • There's probably a more efficient way to do this, but here's at least an example that would work. I think you have to get your result into a state where it can easily be rounded, so I used a combination of log() and power():

    a!localVariables(
      /* Original Variables */
      local!interest: 10,
      local!months: 12,
      
      /* Original Expression */
      local!base: 1+ local!interest,
      local!power: power(local!base, local!months),
      
      /* New Logic */
      local!numberOfDigits:floor(log(local!power, 10)),
      local!decimalOnly: local!power / power(10, local!numberOfDigits),
      local!rounded: round(local!decimalOnly, 2),
      
      /* Final Result */
      local!rounded * power(10, local!numberOfDigits)
    )

Reply
  • There's probably a more efficient way to do this, but here's at least an example that would work. I think you have to get your result into a state where it can easily be rounded, so I used a combination of log() and power():

    a!localVariables(
      /* Original Variables */
      local!interest: 10,
      local!months: 12,
      
      /* Original Expression */
      local!base: 1+ local!interest,
      local!power: power(local!base, local!months),
      
      /* New Logic */
      local!numberOfDigits:floor(log(local!power, 10)),
      local!decimalOnly: local!power / power(10, local!numberOfDigits),
      local!rounded: round(local!decimalOnly, 2),
      
      /* Final Result */
      local!rounded * power(10, local!numberOfDigits)
    )

Children
No Data