
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AVG function wrong results
Dear all, I am building some bar charts and some metrics throughout AVG function.
I don't have any missing values in my dataset. The value that I get in Qlik Sense, both in charts and in tables, is around 89.03, which is a wrong result. The true value is 88.87629904.
If I export the data to excel and compute the sampling average, I get 88.87629904.
If I import again this data to Sense I get the true value: 88.87629904.
This is really weird.
Any insights?
Thanks in advance.
Nico.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try,
=sum(aggr(avg(Value),DimensionInChart))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Nico,
Sometime, this issue is related with your data set with null or 0 values. Try use sum(data)/count(data) instead of AVG
Please mark the CORRECT/HELPFUL comments.
Regards.
OEM Solution Architect
LATAM


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you might also want to read the below
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd try that. However the results remain wrong.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not aware of any problem with the Avg() function. The reason is most likely that content in your data, or that you data model leads to an unexpected data set for example through a synthetic key.
It is impossible to explain the result you get without seeing the actual data you have in the application. Please attach a sample app file, for further advise.
