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: 
Pericator
Contributor III
Contributor III

Number of Occurences Above Avg

Hello,

I want to calculate the number of occurencies above or below Avg. See Example:

UserPercentage Value
15%
210%
315%
420%
525%
630%
735%
840%
945%
1050%

 

I calculate  the Average Values of the Percentages easily, but how can I count the number of Users, which are above/below the Average Percentage Value.

Note: Please suggest how can I handle it in the expression directly not in the load script.

Thanks in Advance

1 Solution

Accepted Solutions
sunny_talwar

So try this may be for Above

Count({<User = {"=[Percentage Value] > Avg(TOTAL [Percentage Value])"}>} DISTINCT User)

 for Below

Count({<User = {"=[Percentage Value] < Avg(TOTAL [Percentage Value])"}>} DISTINCT User)

for Equal

Count({<User = {"=[Percentage Value] = Avg(TOTAL [Percentage Value])"}>} DISTINCT User)

 

View solution in original post

3 Replies
sunny_talwar

What is your expression for the Percentage value?

Pericator
Contributor III
Contributor III
Author

They are pre calculated and are fixed in the qvd. So its just plane numbers.

sunny_talwar

So try this may be for Above

Count({<User = {"=[Percentage Value] > Avg(TOTAL [Percentage Value])"}>} DISTINCT User)

 for Below

Count({<User = {"=[Percentage Value] < Avg(TOTAL [Percentage Value])"}>} DISTINCT User)

for Equal

Count({<User = {"=[Percentage Value] = Avg(TOTAL [Percentage Value])"}>} DISTINCT User)