Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to count the employee, who are above or below the median salary.
The expressions I am using is as follows:
Count({<[CTC]={">="} Median({<[CTC]>} [Employee])
Please help.
May be this:
Above Median
Count({<Employee = {"=CTC > Median(TOTAL CTC)"} Employee)
Below Median
Count({<Employee = {"=CTC < Median(TOTAL CTC)"} Employee)
Thanks for quick response.
I am still not able to get the count. Let me give you more clarity / understanding of data.
I have a column name "Employee Name" & "CTC (USD)". Now trying to write expression on Qlik Sense to get count of employee who are above or below median CTC.
Have tried this: Count({<[Employee Name] = {"=CTC > Median[CTC (USD)])"} [Employee Name])
but didn't work.
Please help.
Try this:
Above Median
=count(if(CTC>Median(Total CTC),Employee ))
Below Median
=count(if(CTC<Median(Total CTC),Employee ))
you sure.. you tried this, I mean it is working for me..
Above Median
=count(if(CTC>Median(Total CTC),Employee ))
Below Median
=count(if(CTC<Median(Total CTC),Employee ))
I guess if the name of the column is CTC (USD), then try this:
Count({<[Employee Name] = {"=[CTC (USD)] > Median(TOTAL [CTC (USD)])"} [Employee Name])
Thanks Kamal !!! The given formula is working absolutely fine however still not solving the purpose.
Its giving the count of employee, who are above or below the median but calculating the median of entire population. For example: Data has all job levels like: Executive, Senior Executive till higher leadership. If we compare the CTC with higher leadership with junior management then this will not the right way of analysis.
Can it be possible that the median / average automatically changed when we draw a graph at Job level?? I believe this is due to "Median(Total CTC)".
I tried "count(if([CTC (USD)] > Median([CTC (USD)])]),[Employee Name]))" but expression error. Please help
Thanks Sunny for your response but this is still not working. Writing Median command under " " will not get identified by the application.
Also, can we avoid the "Total" Command as this will be resulting wrong analysis. Please suggest,
Would you be able to share a sample to show where this isn't working?
I have shared the dummy data on another post as unable to attached the same in this post.