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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
MVP
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
MVP
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