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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SQL iif Logic in Qlikview

I want to perform the task that if done in SQL would be

Sum(IIF([Field1] = 0,[Field2],0)). 

I am having a hard time figuring out how to do it in Qlikview. I have tried

Sum({$<[Field1] = {0} >} [Field2]) .  This returned 0.

Any help would be appreciated.

1 Solution

Accepted Solutions
vincent_ardiet
Specialist
Specialist

Hi,

Have you try:   =sum(if([Field1]=0,[Field2]))  ?

Regards,

Vincent

View solution in original post

2 Replies
vincent_ardiet
Specialist
Specialist

Hi,

Have you try:   =sum(if([Field1]=0,[Field2]))  ?

Regards,

Vincent

Not applicable
Author

Thanks so much. It worked.  Who knew I should try the simplest answer first, I will be sure to do that in the future.