Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with Set Analysis

Hello all,

In my initial load, I have evaluated a condition and set a flag for each record (0 or 1).  Now I want to create a straight table from these results only showing records where the flag above is "1".  Sounds easy but I can't get it.

Thanks.

1 Solution

Accepted Solutions
Nicole-Smith

Your set analysis should look like this:

{<YourFlagField={1}>}

So your expression should look like this (using whatever calculation you're using):

sum({<YourFlagField={1}>} SomeFieldToSum)

View solution in original post

4 Replies
Colin-Albert

This does not need set analysis.

In your data load rather than setting the flag field to 1 or 0, set the flag to 1 or null.

     if(value = x,1) as flag          // the expression does not have an else value

Then you can add your flag field as a dimension and set the "Suppress When Value Is Null" option on the Dimension sheet.

MK_QSL
MVP
MVP

Create a Calculated Dimension:

If(Flag = 1, YourDimensionName)

Nicole-Smith

Your set analysis should look like this:

{<YourFlagField={1}>}

So your expression should look like this (using whatever calculation you're using):

sum({<YourFlagField={1}>} SomeFieldToSum)

Colin-Albert

Another option (again not using set analysis)

=sum(value * flag)