Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
Contributor III

SQL iif Logic in Qlikview

Hi,

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

Regards,

Vincent

2 Replies
vincent_ardiet
Contributor III

SQL iif Logic in Qlikview

Hi,

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

Regards,

Vincent

Not applicable

SQL iif Logic in Qlikview

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