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: 
Not applicable

Sum a group

Hello

I thought this is doable with set analysis but I cannot seem to find a way.

I need Sum(Score) for Study ID when a user has selected one of the User ID.  

     

User IDFirst NameLast NameStudy IDScore
1ab14
2cd12
3ef11
4aabb22
5cd24
6eeff22

In this data, a user may select Last Name = b. The last name b has study ID =1 so in that case I need the sum of score to be 7.

If a user selects Last Name = d; that has study ID 1 and 2. So the Sum needs to be 15.

How to do that?

Thanks

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum({<[Last Name], [Study ID] = P([Study ID])>}Score)

View solution in original post

2 Replies
sunny_talwar

May be this:

Sum({<[Last Name], [Study ID] = P([Study ID])>}Score)

Not applicable
Author

Worked like a charm. I included the other columns and it works perfectly.

Sum({<[User ID], [First Name], [Last Name], [Study ID] = P([Study ID])>}Score)