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: 
beck_bakytbek
Master
Master

calculation of avg by excluding of certain numbers

Hi Folks, 

i got a question, my tables does look like:

idnumber1
15
27
33
412
55
68

 

The average of all numbers is 6,67. My issue is, i want to calculate the average by excluding the numbers: 5 ( i want it to do dynamically, 

for example: 

the average of all numbers is 6,67. When i exclude the numbers: 5, then my average is: 7,5.

Does anybody have any idea how to solve this issue, any feedbacks are appreciated.

Thanks a lot

Beck

Labels (1)
4 Replies
Channa
Specialist III
Specialist III

=avg({<number1-={5}>} number1)

 

it will help you

Channa
beck_bakytbek
Master
Master
Author

Channa,

first of all thanks a lot for your help and time,

your solution is very helpful, but i am looking for solution, where i can use the excluding in expression (dynamically) without set expression.

do you have another idea?

Channa
Specialist III
Specialist III

Table1:
LOAD
id,
number1
FROM [lib://TEST/exclude.xlsx]
(ooxml, embedded labels, table is Sheet1);

Table2:
Load id as ID1,
number1 as Number2 Resident Table1 where number1<>5;

 

Just take AVG(Number2) take QVF

Channa
beck_bakytbek
Master
Master
Author

Channa thanks a lot for your help and time