Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
entsh
Contributor II
Contributor II

sum with condition

hi

please consider below table:

i want to sum all the row number but  the numbers that mention in refer to column

rownumberrefer to
1500 
24001
31001
4203
540 
630 

 

result = 400+20+40+30=490

explain :there are 2 unique  numbers in refer to column ( 1 and 3) it means sum all the row number but 1 and 3

 

1 Solution

Accepted Solutions
MayilVahanan

Hi @entsh 

Try like below

Sum({<row ={$(vreferto)}>}number)

 

vreferto =Concat(DISTINCT If(Len(Trim([refer to]))>0, [refer to]), ',')

O/p:

MayilVahanan_0-1624777216352.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

Hi @entsh 

Try like below

Sum({<row ={$(vreferto)}>}number)

 

vreferto =Concat(DISTINCT If(Len(Trim([refer to]))>0, [refer to]), ',')

O/p:

MayilVahanan_0-1624777216352.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.