Appian bar charts - how to prevent trailing decimal places to appear in label

hi, 

I have built a bar chart with a simple measure of SUM of time

but when I put the labels I see

a value like 47.9499999999999996

I have checked the issue is not with data.. I do not have that kind of data. I have a solution that I round off the the time taken, store it in another variable and use it for SUM and it works.. but I cannot individually round off the time field.. the overall data deviates a lot. All I need is to round off the above data to 47.95 .. when I see the expression generated by the MEASURE function on the chart I see

Is there a way i can modify this expression so that it returns a value upto 1 or 2 decimal places..

I tried using round func in this expression but that's not working

thanks much 

jaideep

 

  Discussion posts and replies are publicly visible

Parents
  • It looks like you found how you can use the formatValue parameter, but I'm not sure using roundup() or rounddown() is the right answer. In both of those cases it will always round in the specified direction. For example, this expression returns 2:

    roundup(
      1.000001,
      0
    )

    I think instead you want to use the regular round() function which will round up or down depending on if the value is closer to the higher or lower value.

Reply
  • It looks like you found how you can use the formatValue parameter, but I'm not sure using roundup() or rounddown() is the right answer. In both of those cases it will always round in the specified direction. For example, this expression returns 2:

    roundup(
      1.000001,
      0
    )

    I think instead you want to use the regular round() function which will round up or down depending on if the value is closer to the higher or lower value.

Children