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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
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

1 Solution

Accepted Solutions
Nicole-Smith

Is the attached what you're looking for?

View solution in original post

5 Replies
Nicole-Smith

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

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