Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

partial "avg" instead of "sum" in pivot table

Is it possible, to use a partial "average" instead of the partial sum ? It is possible to use it for one collumn, but is it possible, to use the average for all collumns (like partial sum) ?

partial average pivot2.jpg

Even so, by using "=Avg(data)" in the partial sum field, it sometimes produces errors. has anyone an idea why this happens ?

The avg of 3x temperature should be 66C, but QV shows 22C. For another dataset, the same table shows the right data.

partial average pivot.jpg

i read some other discussions, which were dealing only with partial AVG, but

- there are few

- there was no successfull answer to this particular problem.

Thank you for your suggestions in advance. Im shure im not the only one looking for this solution.

Have a nice new year.

Alex

2 Replies
swuehl
MVP
MVP

You are using a pivot table, I believe in a pivot table, the partial sum is actually a subtotal with an expression Total (despite the name 'Sum', it is depending on your expression what you get).

To get an average subtotal, I think you could either

- use advanced aggregation (look into the sum-of-rows example in the Help)

or

- check for dimensionality() and use separate expressions for most granular and subtotal lines.

See also the Help on dimensionality() function, please.

If you upload a small data set, someone might be able to help you figure out the correct syntax, too.

Regards,

Stefan

Not applicable
Author

swuehl:

You are using a pivot table, I believe in a pivot table, the partial sum is actually a subtotal with an expression Total (despite the name 'Sum', it is depending on your expression what you get).


I think thats the problem. I will look into the "dimensionality()" function.

When i find a Solution or a new angel, i will post it here.