Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

set analysis with if


i have a field with values greater and less than 0.

so, i need to make a set analysis where if the value of A is greater than 0 is sum with a field B, and if it's less than 0 is sum with a field C.


Tags (1)
2 Replies

Re: set analysis with if

No need for an if statement:

Sum({<A = {">0"}>} B) + Sum({<A = {"<0"}>} C)


Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

Re: set analysis with if

You don't seem to ask a question in your post, but based on the subject I assume you want to know how to do a conditional sum?

Set analysis limits (or extends) the set of data the formula is working on, so that's not the way to go here. If is the function you want:


This wil check the value of Field A for each record and if it is greater than 0 it will add FieldB to the total sum, else Field C

Hope that answers the question you didn't ask

Community Browser