Forum

This content is now out of date.

Visit Our Community

Rounding when taking averages

I am having trouble identifying why the rounding, when averaging, within a Yellowfin report is not working properly.

As can be seen in the first attachment, for this question there are 14 reported scores:

1 person scored a 20
6 people scored an 80
7 people scored a 100

The average of these scores is 85.7, however when averaging I am seeing the result as 85.0 as indicated in the second attachment. Why would this happen?

This is a client facing solution, I hope to hear back soon.

Thank you,

Adam

Hi Adam,

Thank you for the question.

I am currently looking in to this for you and I think the issue with the average is relating to how Yellowfin manages the column formatting. I have included a link below to our Wiki that talks through this process, the section I would advise you to look at is the Display section as this talks about the process of rounding the figure.

yellowfin

If you do have any further questions please feel free to contact us,

Thanks

Adam
Hi Adam,

Along with what the other Adam mentioned...this likely has to do with how your column is formatted at the database level. For example, if my 'score' field is a float, the average is applied as expected:


Forum image


There are a couple of ways that you can get around this.

1. Either change the data type at the database level

or

2. Use a freehand SQL calculated field in Yellowfin to convert/cast the datatype into a float/double etc. This method is database dependent as the functions in each database differ. Here is an example of how to do this if you are using SQL Server:

SQL Server Convert() Function

Hopefully this information is helpful. Please let us know if you have further questions/concerns.

Kind Regards,

Dustin