Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlik Expression

Friends,

I need to find the count of employees who are working between 3 to 7 hours. But it has to be changed when I select multiple months and years too. So, I had the below expressions,

count(DISTINCT Aggr(if(round(sum(MonthlyWorkHour)/Count(DISTINCT MonthYear))<4,EmployeeID),EmployeeID)) - this is for employees working below 4 hours and

count(Distinct Aggr(if(round(sum(MonthlyWorkHour)/Count(DISTINCT MonthYear))<8 and round(sum(MonthlyWorkHour)/Count(DISTINCT MonthYear))>3 ,EmployeeID),EmployeeID)) - this one is for 3 to 7 hours

I got the first expression (<4 hours) perfectly. But I couldn't get the second one (3 to 7 hours), I think the if condition I used is wrong somewhere, please correct it for me guys.......

2 Replies
Anonymous
Not applicable
Author

Hi,

I do not see anything wrong with the expression.

Perhaps the expression is not returning anything

muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

can you send sample data?

Muthukumar Pandiyan