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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
danieloberbilli
Specialist II
Specialist II

Weighted average

Dear all,

I would like to get the weighted average age of 5 persons. I get along until sum(aggr(sum(PersonWeight),Age)).

The last step of the calculation would be simply to divide this result by the total number of weighted Persons - but I dont get the right Aggr with this.

Please find attached my qvw which also includes a screenshot with my calculation in Excel.

Any ideas?

Thanks a lot in advance.

Daniel

Capture.PNG.png

Labels (1)
1 Solution

Accepted Solutions
Nicole-Smith
MVP
MVP

Is the attached what you're looking for?

View solution in original post

5 Replies
Nicole-Smith
MVP
MVP

Is the attached what you're looking for?

danieloberbilli
Specialist II
Specialist II
Author

Yes, the yellow marked value of 18.79 as average year is what I am looking to get in QV

Nicole-Smith
MVP
MVP

So the .qvw that I posted above gives you what you need?

danieloberbilli
Specialist II
Specialist II
Author

Ahhh - sorry - I didnt see your attachment - I thought you are talking about my mine

Thanks a lot - exactly what I needed!

All the best

Daniel

Anonymous
Not applicable

Thank you that was very very helpful