Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shanky1907
Creator II
Creator II

Remainder Function in set analysis with aggregation

Hello All,

I have to implement one expression where only those EMP should be counted who have completed all their assigned trainings, which means CompletedTopics/TotalTopics = 1 or TotalTopics-CompletedTopics = 0.

Now, i will tkae Count of EMP according to the condition put up in set analysis.

Also i want to aggregate the values with EMP as different Employees have different assigned number of Topics.

Here, my Dimension is Team.

So, the final count will represent the number of employees in that team who have completed all their asigned topics.

Thanks in advance.

1 Solution

Accepted Solutions
shanky1907
Creator II
Creator II
Author

REmoving the sum solves my issue:

count({<EMP={"=(CompletedTopics)=(TotalTopics)"}>}distinct EMP)


Thanks for the help.


View solution in original post

6 Replies
Gysbert_Wassenaar

Perhaps like this: count({<EMP={"=sum(CompletedTopics)=sum(TotalTopics)"}>}distinct EMP)


talk is cheap, supply exceeds demand
shanky1907
Creator II
Creator II
Author

Thanks for the reply Gysbert.

But the expression is not giving correct result in Total.

Gysbert_Wassenaar

Please post an example that demonstrates the issue.


talk is cheap, supply exceeds demand
shanky1907
Creator II
Creator II
Author

REmoving the sum solves my issue:

count({<EMP={"=(CompletedTopics)=(TotalTopics)"}>}distinct EMP)


Thanks for the help.


sunny_talwar

You can further improve this by carrying out this calculation in the script

If(CompletedTopics = TotalTopics, 1, 0) as TopicFlag


and then this:

Count({<TopicFlag = {1}>} DISTINCT EMP)

shanky1907
Creator II
Creator II
Author

Yes, exactly i thought abou this approach also if couldn't get it rohgt on Sheet level.

Thanks for the input Sunny.