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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

condition in set analysis

I have two fields. I want to write expression where field 1 values equal to field2. like sum the amount where field1=field2.

I tried sum({<field1 ={"field1=field2"}>}Amount) but not working

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

may be you missed '=', try

sum({<field1 ={"=field1=field2"}>}Amount)

View solution in original post

6 Replies
Kushal_Chawda
MVP
MVP

may be you missed '=', try

sum({<field1 ={"=field1=field2"}>}Amount)

maxgro
MVP
MVP

with field1 and field 2 as dimensions

sum(if(field1=field2, amount))

sunny_talwar
MVP
MVP

May be make the change in the script itself

LOAD field1,

          field2,

          If(field1 = field2, 1, 0) as Flag

FROM ...

and then use this:

Sum({<Flag = {1}>}Amount)

Not applicable
Author

Try this one

sum({<field1 ={'=field1=field2'}>}Amount)

sum(if(field1=field2,amount))

Not applicable
Author

Try this:

SUM(IF(Field1 = Field2, amount, 0))

Look for my QVW! !

Not applicable
Author

.