Decimals not showing in reports

MaharshiC
Tera Contributor

Hi,

I have created reports using indicators and breakdowns. In my report I wanted to have the average of the (closed- created) . This is the indicator config - 

MaharshiC_0-1738329443766.png

and this is the script -

var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();};
var hours=function(x,y){return diff(x,y)/(24*60*60*1000);};
hours(current.task_sys_created_on, current.task_closed_at);

Now I am getting the correct values but they are in whole number like 2 days, 3days but i am not getting decimal values. If there are decimal values its getting rounded off. Is there a way to show the decimal values in the graph?

MaharshiC_1-1738329843461.png

 

Regards,

Maharshi

 

2 REPLIES 2

AndersBGS
Tera Patron
Tera Patron

Hi @MaharshiC ,

 

As you can see from your own screenshot, you have selected "0" in precision. Set this to 2 instead, then it should work.

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @MaharshiC 

Go to the report --> style --> General and update decimal to 2.

 

AGLearnNGrow_0-1738359323346.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************