Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Rich5678
Contributor III
Contributor III

Can I get Weighted Average in Total Row of Simple Table?

Hi,

Does Qlik have capability to show "Weighted Average" in place of a Simple Average in Total Row of a Plain Table.

Subject Marks Weight Weighted Avg
Math 97 0.1 9.7
Physics 85 0.2 17
Language 75 0.3 22.5
Music 64 0.4 25.6
       
  80.25 1 74.8

 

When you look at options Totals Function in Qlik Sense, we see only the following Options in a Simple Table..

Rich5678_0-1661888011677.png

 

Can someone clarify, if there is a Way to get Weighted Average in that Last Row representing Totals.

Thanks

 

 

 

 

 

 

 

Labels (5)
1 Solution

Accepted Solutions
sidhiq91
Specialist II
Specialist II

@Rich5678 Yes you can definitely get it. Please see the code that I have written in the back end first.

NoConcatenate
Temp:
Load *,
Marks*Weight as [Weighted Avg]

Inline [
Subject, Marks, Weight
Math, 97, 0.1
Physics, 85, 0.2
Language, 75, 0.3
Music, 64, 0.4
];

Exit Script;

Please see the screen shot below for the expression used in the front end:

sidhiq91_0-1661917767482.png

If this resolves your issue, please like and accept it as a solution.

View solution in original post

1 Reply
sidhiq91
Specialist II
Specialist II

@Rich5678 Yes you can definitely get it. Please see the code that I have written in the back end first.

NoConcatenate
Temp:
Load *,
Marks*Weight as [Weighted Avg]

Inline [
Subject, Marks, Weight
Math, 97, 0.1
Physics, 85, 0.2
Language, 75, 0.3
Music, 64, 0.4
];

Exit Script;

Please see the screen shot below for the expression used in the front end:

sidhiq91_0-1661917767482.png

If this resolves your issue, please like and accept it as a solution.