Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

shanky1907
Contributor 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
Contributor II

Re: Remainder Function in set analysis with aggregation

REmoving the sum solves my issue:

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


Thanks for the help.


6 Replies

Re: Remainder Function in set analysis with aggregation

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


talk is cheap, supply exceeds demand
shanky1907
Contributor II

Re: Remainder Function in set analysis with aggregation

Thanks for the reply Gysbert.

But the expression is not giving correct result in Total.

Re: Remainder Function in set analysis with aggregation

Please post an example that demonstrates the issue.


talk is cheap, supply exceeds demand
shanky1907
Contributor II

Re: Remainder Function in set analysis with aggregation

REmoving the sum solves my issue:

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


Thanks for the help.


Re: Remainder Function in set analysis with aggregation

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)

Highlighted
shanky1907
Contributor II

Re: Remainder Function in set analysis with aggregation

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

Thanks for the input Sunny.

Community Browser