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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
klrameet
Contributor III
Contributor III

Issue with Conditional Sum expression

Hi

I am trying to write an expression to take the total of 'Counts' based on the calculated Rank, where Rank is a corresponding number associated with Submission. 

I am getting error for the below expression:

=Sum({<Rank*={dual(Submission,Rank)+1}>}Counts)

So based on Filter selection on submission, i want to calculate the sum of counts for the next Rank.

e.g. if some selects A, my sum of counts should display 14+14+17 = 45

Sample Data:

Submission   Rank   Counts

A                         1                     15

A                         1                     17

A                         1                     20

B                         2                     14

B                         2                     14

B                         2                     17

C                         3                     11

C                         3                     13

C                         3                     18

Appreciate any inputs.

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this

=Sum({<Rank = {$(=Max(Rank)+1)}, Submission>} Counts)

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

May be this

=Sum({<Rank = {$(=Max(Rank)+1)}, Submission>} Counts)