Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional view of set analysis query in straight table

Hi,

Please can someone help with my query?

I have a straight table in Alternate State 'Regular' with:

Dimension: Customer ID

Expressions: sum({[Analysis Group 1] * $}[Product Ordered]) , sum({[Analysis Group 2] * $}[Product Ordered])

Customer
  ID
sum({[Analysis Group 1] * $}[Product Ordered])sum({[Analysis Group 2] * $}[Product Ordered])
110050
2080
3600
45075

I want to only diplay rows where sum({[Analysis Group 1] * $}[Product Ordered]) > 0 and sum({[Analysis Group 2] * $}[Product Ordered]) > 0 so my table looks like:

Customer
  ID
sum({[Analysis Group 1] * $}[Product Ordered])sum({[Analysis Group 2] * $}[Product Ordered])
110050
45075

How do I do this please?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Yes and unfortunately that didn't work.

I have however figured it out!  I defined the expression as:

if(sum({[Analysis Group 1] * $}[Product Ordered])>0 and sum({[Analysis Group 2] * $}[Product Ordered])>0,sum({[Analysis Group 1] * $}[Product Ordered])

and similarly for sum({[Analysis Group 2] * $}[Product Ordered]).

I then ensured that suppress zero values and suppress missing were checked for my dimension and expressions.

Thanks for all your help.

View solution in original post

6 Replies
tresesco
MVP
MVP

Copy your condition, goto presentation tab, Select the first expression under column, select 'Conditional', put the expression, select the second expression and put the same expression selecting conditional.

hope this helps

Not applicable
Author

Thanks.  That works for each of my expressions separately, but not when I combine them.  I need both sum({[Analysis Group 1] * $}[Product Ordered]) > 0 and sum({[Analysis Group 2] * $}[Product Ordered]) > 0 for the row to display.  Any thoughts?

simondachstr
Luminary Alumni
Luminary Alumni

sum({[Analysis Group 1] * $}[Product Ordered])*sum({[Analysis Group 2] * $}[Product Ordered])>0 maybe?

Not applicable
Author

No that doesn't work either.  I am wondering whether I need to use a calculated dimension?

tresesco
MVP
MVP

Have you tried putting the combined expression as the conditional expression(presentation tab) for both of the expressions like:

=sum({[Analysis Group 1] * $}[Product Ordered]) > 0 and sum({[Analysis Group 2] * $}[Product Ordered]) > 0

?

Not applicable
Author

Yes and unfortunately that didn't work.

I have however figured it out!  I defined the expression as:

if(sum({[Analysis Group 1] * $}[Product Ordered])>0 and sum({[Analysis Group 2] * $}[Product Ordered])>0,sum({[Analysis Group 1] * $}[Product Ordered])

and similarly for sum({[Analysis Group 2] * $}[Product Ordered]).

I then ensured that suppress zero values and suppress missing were checked for my dimension and expressions.

Thanks for all your help.