Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Issue

Hi All,

Can you please help me with this question?

let me describe my issue

i have one small table which consists of EmpName,TrainingHours,MinimumHours

i want to create expression for this:i want to calculate only no of employees who have more traininghours when compared respective Minimumhours

I tried to use the expression in Text Objects

Thanks

Suresh

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If the hours are already summarized by EmpName, you should be able to use:

=count(if(TrainingHours > MinimumHours,1))

If the hours are not summed, use an aggr like this:

=count(if(aggr(sum(TrainingHours) > sum(MinimumHours),EmpName),1))

-Rob

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If the hours are already summarized by EmpName, you should be able to use:

=count(if(TrainingHours > MinimumHours,1))

If the hours are not summed, use an aggr like this:

=count(if(aggr(sum(TrainingHours) > sum(MinimumHours),EmpName),1))

-Rob

Not applicable
Author

My Data looks Like this

EmpName    TrainingHours   MinimumHours

E001            2                          3

E002           2                           3

E003           6                           3

E004           7                          3

Not applicable
Author

Hi Rob,

Thank you so much!

Expression works for me

Suresh