Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
vijayUV
Contributor II
Contributor II

Avg Function Not producing expected results

I have a data set that has the following information 

Sum(TAT) = 8635

Count(TAT) = 2

When I do an average either using Avg function or SUM/Count my expected value is  4317.5

But for some reason, I am getting, 179.89

Can someone help me with this weird issue?

Many Thanks.

 

Labels (1)
1 Solution

Accepted Solutions
vijayUV
Contributor II
Contributor II
Author

I have identified the issue,

My TAT column type is 'Interval in hrs' and the sum value is calculating the total value of the hrs but

the AVG function is considering this SUM value as a number, which is resulting in the wrong values. When I calculated the interval of the avg value it gives the exact values. 

The solution for my problem is -  Interval(Avg(TAT),'hh')

View solution in original post

4 Replies
Anil_Babu_Samineni

What you've tried? 

1) Avg(TAT)

2) Sum(TAT)/Count(TAT)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Would you be able to share a sample where we can see this issue?

vijayUV
Contributor II
Contributor II
Author

The data set hasDeptName, EmpName column and the TAT(Turn around Time in Hrs) columns, we are calculating the Min.TAT, Max.TAT and the Avg.TAT

Avg(TAT) function or Sum(TAT)/Count(TAT)

Both are giving results that are incorrect when I calculate manually. 

Can you please throw some light on this.

Thanks,

Vijay

 

vijayUV
Contributor II
Contributor II
Author

I have identified the issue,

My TAT column type is 'Interval in hrs' and the sum value is calculating the total value of the hrs but

the AVG function is considering this SUM value as a number, which is resulting in the wrong values. When I calculated the interval of the avg value it gives the exact values. 

The solution for my problem is -  Interval(Avg(TAT),'hh')