Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
swarup_malli
Specialist
Specialist

Suppress rows depending on the value of a particular expression

I have a straight table with 6 dims and 20 expressions .Its a detailed table I building for the business users who plan to export it to excel.

Currently the table  shows all the rows ,I only want to show the rows when a particular expression has the value '1' in it and suppress when the value of this expression is zero.

I know I can use something like this

if ( my expression < 1 , null(),expression),

This approach means I have to code this in all 20 expressions present in the table ,which is a real pain in the neck ;-(

I'm planning to create 80 charts of the same type

I can start a new thread from here any ideas

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe you can deal with the concern of requiring unique values in the Dimensions by specifying all Dimensions in the aggr. For example, you could code the first Dim as

=aggr(if(sum(Expression3)>30, Dim1), Dim1, Dim2, Dim3)

And then suppress when null. You would only need to do this for one Dimension, just include the complete list of Dims in the aggr. See attached,

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

5 Replies
rubenmarin

Hi swarup, if your last dimension has unique values (not the same value in different segments) you can transform your last dimension to a conditional dimension like:

Aggr(If(your_expression>0, DimensionFieldName), DimensionFieldName)

JonnyPoole
Employee
Employee

You could try variablizing a portion of that expression 'if ( my expression < 1,null() '  and combining that in the expression editor for a little less neck pain ?

Or consider doing it in a dimension if you only have a few of those but it could introduce some slower performance (with aggr() etc..)

swarup_malli
Specialist
Specialist
Author

Thank you ! Guys

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe you can deal with the concern of requiring unique values in the Dimensions by specifying all Dimensions in the aggr. For example, you could code the first Dim as

=aggr(if(sum(Expression3)>30, Dim1), Dim1, Dim2, Dim3)

And then suppress when null. You would only need to do this for one Dimension, just include the complete list of Dims in the aggr. See attached,

-Rob

http://masterssummit.com

http://robwunderlich.com

swarup_malli
Specialist
Specialist
Author

Thank you ! Guys