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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Rich5678
Contributor III
Contributor III

Help with simple Weighted average calculation

I have 3 columns

Subject           Difficulty-level             Score                   Weighted Score

Math                       90                                     85                         30.00 

English                  70                                      92                         25.25

Physics                  95                                     75                           27.94

Total                     255                                                                    83.20

What I am looking is for new Column called Weighted Score where the calculation is as below

Score * Difficulty-level / Total Difficulty-level

i.e.,

85 * 90 / 255 = 30.00

92 * 70 / 255 = 25.25

75 * 95 / 255 = 27.94

Total 83.20

I tried using a Qlik Sense formula as below, but did not work.

Score * Difficulty-level / sum(Difficulty-level)

But above did not work.

Help is appreciated. Thanks

 

Labels (3)
3 Solutions

Accepted Solutions
Kushal_Chawda

@Rich5678  try below

Score * Difficulty-level / sum(total Difficulty-level)

View solution in original post

hjimenez
Employee
Employee

Hi Rich5678,

You should try this formula: (Sum([Difficulty-level]) * Sum(Score)) / sum(Total [Difficulty-level]).

Regards,
Hector Jimenez

View solution in original post

Rich5678
Contributor III
Contributor III
Author

Thanks very much, very helpful

View solution in original post

5 Replies
Kushal_Chawda

@Rich5678  try below

Score * Difficulty-level / sum(total Difficulty-level)

Rich5678
Contributor III
Contributor III
Author

Many thanks for quick reply,

but I copied your solution exactly, and unable to get it right

Kushal_Chawda

@Rich5678  could you post screenshot of what is wrong and what it should be?

hjimenez
Employee
Employee

Hi Rich5678,

You should try this formula: (Sum([Difficulty-level]) * Sum(Score)) / sum(Total [Difficulty-level]).

Regards,
Hector Jimenez
Rich5678
Contributor III
Contributor III
Author

Thanks very much, very helpful