Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ift_isabelle
Partner - Creator III
Partner - Creator III

Average Multiple Variables in Script

Hi,

I have multiple score-variables and i want to make an average. It can be done with set analysis, but i have my reasons why i want it in the script. Anyone knows how to do that?

I have this:

NameScore 1Score 2Score 3Score 4Score 5
A7591
B2953
C59
D576
E4

And i want this:

NameAverage Score
A5.5
B4.8
C7
D6
E4

I tried AVG(Score 1, score 2, score 3, score 4, score 5) but it doesn't work.

Thanks,

Isabelle

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try RangeAvg([Score 1], [Score 2],[Score 3],[Score 4],[Score 5])


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Try RangeAvg([Score 1], [Score 2],[Score 3],[Score 4],[Score 5])


talk is cheap, supply exceeds demand
sunny_talwar

May be try this:

RangeAvg(Score 1, score 2, score 3, score 4, score 5)

cm
Contributor II
Contributor II

Sunny,

This question is from a few years ago, but I'd like to revive it and ask a follow on...

You correctly advised that <<<<Rangeavg(Score 1, Score 2, Score 3, Score 4, Score 5) >>>>>> will return the results in the second table, i.e. "A" with average of 5.5, "B" average of 4.8, etc.

How can you then get an average of the Range Averages?? In other words, what expression would return the average of {A=5.5}, {B=4.8}? Essentially it would be a column average... How can you write a column average expression when the values in the column are range averages?

 

THANKS

CM

Capture.PNG