Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
ValeriaBonini
Partner - Creator
Partner - Creator

weighted average

Hi, I have a table like this:

 

Order_Id       Price     Quantity

1                      5             10

1                      7              3

1                       4             34

 

How can I calculate the weighted average of the price based on the quantity?

 

Labels (3)
1 Reply
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

If it's in chart:

Sum(Price *Quantity) / Sum(Quantity)

Help users find answers! Don't forget to mark a solution that worked for you!