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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
mwallman
Creator III
Creator III

IF SUM expression not working. How to get it to work?

Hi,

I am trying to make the following expression to work in the user interface work:

IF(

Field1='Yes'

or

Field2='Yes' and Field3='Product*'

or

Field4='Yes',

Sum({<SomeSetAnalysisHere>}Sales)

)

It returns a "-".

I have ensured my Sum({<SomeSetAnalysisHere>}Sales) has values,


Most of the 'Yes' fields are Yes/No type fields.


How can I get this to work please?

2 Replies
jaumecf23
Creator III
Creator III

Hi,

Try this:

Sum({<Field1={'Yes'}>+<Field2={'Yes'},Field3={'Product*'}>+<Field4={'Yes'}>}Sales)

CarlosAMonroy
Creator III
Creator III

Hi Michael,

Maybe try this:

IF( Field1='Yes' or (Field2='Yes' and wildmatch(Field3,'Product*'))  or Field4='Yes',

Sum({<SomeSetAnalysisHere>}Sales)

  )


Hope that helps,

Carlos M