# How do you round up a decimal on a gauge graph

Member

I can't figure out how I can round up the decimal on a gauge fill graph.  Do not see an option in the chart properties nor the formatting of the field used for the gauge.  It is set to number with 0 decimal in the formatting but the decimal still shows.  See attached

Thank you for any assistance.

• Coach

Did you try this?

`ROUND(AVG(DATEDIFF(`Investigation End Date`,`Investigation Start Date`)),0)`
**Check out my Domo Tips & Tricks Videos

**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.

• Coach

In the Chart Properties under General, place a check next to Abbreviate Values. Along with the zero decimal places you already have selected, this should do it. It is working for me.

**Check out my Domo Tips & Tricks Videos

**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.
• Member

Thank you for the reply.  I do have that checked and it is not working for me.  My output is based on a formula: AVG(`Investigation End Date`-`Investigation Start Date`) so I wonder is that has something to do with it.  It is taking the difference between the start and end dates of reports with the quarter and getting an average, but output is in decimal format.

• Coach

I wouldn't think that a beast mode would prevent it from rounding, but you could use the round function on the outside of your average function within the beast mode. You should be able to round it to zero decimals in there.

**Check out my Domo Tips & Tricks Videos

**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.
• Coach

I don't think it's SQL correct syntax to subtract dates using

date - date.

you should use date_diff(end_date, start_date)

OR

convert your dates to unix_timestamp() and then subtract.

see if that impacts the output.

Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨‍💻

**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"
• Member

Thanks, I did try that formula and get the same output in decimal format.  I now want to round the output to the nearest whole number and  not sure how to.  I tried to use the round function, but it's not working or I am not using it correctly.  thanks for you assistance

AVG(DATEDIFF(`Investigation End Date`,`Investigation Start Date`))

The output is 108.38.

Nothing in the properties allows for rounding.

• Coach

Did you try this?

`ROUND(AVG(DATEDIFF(`Investigation End Date`,`Investigation Start Date`)),0)`
**Check out my Domo Tips & Tricks Videos

**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.
• Member

Thank you, Can you give me an example of the round function.  I tried and not getting it to work.  What would go inside the parentheses?  Thank You.

AVG(DATEDIFF(`Investigation End Date`,`Investigation Start Date`))Round()

• Member

Perfect, That worked!  Thank you very much Mark.

This discussion has been closed.