Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count expression on Qlik Sense - Help needed

I am trying to get the count of employee, who are above or below the average / median salary. However getting some challenges.

Have tried these: Count(if([CTC (USD)] < Avg(Total [CTC (USD)]),[Employee Name]))

But the challenge is that the Average is getting calculated for entire population, which is giving the wrong analysis. Data has all job levels and when I draw graph at job level, average should be calculated individual job levels. Comparing salary with lower job level with higher is not the right way.

Have attached the dummy data. Please help.


2 Replies
sunny_talwar

Is this the output you are expecting to see?

Capture.PNG

Expression:

Count(DISTINCT {<[Employee Number] = {"=[CTC (USD)] < Avg(Total [CTC (USD)])"}>} [Employee Number])

Not applicable
Author

Given response on earlier post. Thanks