Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help required for calculating average Total

I have attached a qvw file with the scenario which we are trying to resolve.

In the file you could see a Pivot table with average sales with partial sum enable for Year(second dimension). The issue reporting is

for Product 1 Year 2013, the average is (84+85)/2 = 84.50 which is rounded to 85.

for Product 1 Year 2014, the average is (85+86)/2 = 85.50 which is rounded to 86.

for Product 1,the partial sum is expected to be the average of rounded off value  (85+86)/2 =85.50 round to 86. But I think in pivot table, it is calculated as (84+85+85+86)/4 or (84.50+85.50)/2 and displayed as 85.

1 Solution

Accepted Solutions
morgankejerhag
Partner - Creator III
Partner - Creator III

Hello,

See my attached file. The "problem" is that you are viewing the values as integers even though they have decimals. If you really want an average of rounded values you can do as I did in the last column.

View solution in original post

2 Replies
morganaaron
Specialist
Specialist

Kirti,

Not sure why you'd want to do this, as 86 would be a false average of the total - which Qlik is trying to give you!

I can only recommend resident loading your data summed to year level and rounded - so your data would then be by year as 85 and 86, and would then average to 86 when rounded up.

morgankejerhag
Partner - Creator III
Partner - Creator III

Hello,

See my attached file. The "problem" is that you are viewing the values as integers even though they have decimals. If you really want an average of rounded values you can do as I did in the last column.