Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikvw2019
Contributor
Contributor

How to add Where clause to Straight table expression

How can  i add a where to Straight Table ,

 

1)Display Results only if Column "Status"=COMPLETE 

2) Might also add And , or to the above expression for different column

1 Solution

Accepted Solutions
awaisqureshi
Contributor III
Contributor III

I sounds like dilipranjith's answer would be an ideal solution for this.

Maybe you can try putting one of the dimensions in the expressions by using the only function.

For example you want a table showing DimensionA, DimensionB, & DimensionC where Status=Complete.

You can have DimensionA & DimensionB as your dimensions and the following as an expression in your chart:

=only({<Status={'Complete'}>}DimensionC)

Let me know if that works for you.

View solution in original post

8 Replies
dplr-rn
Partner - Master III
Partner - Master III

Use set analysis .
e.g. your measure is Sum(Amount)
Change measure to
Sum({<Status={'Complete'}>}Amount)

putting 'and' e.g.
Sum({<Status={'Complete'}, DummyCol={'DummyVal'}>}Amount)

check below link. there are a lot of videos on qlik website or on youtube which can give you more basic overview
http://livingqlikview.com/livingqlik-roots-the-ultimate-qlikview-set-analysis-reference/
qlikvw2019
Contributor
Contributor
Author

I dont any  sum expression. If only needs to display THE COLUMNS ,  if status=COMPLETE

dplr-rn
Partner - Master III
Partner - Master III

You dont have any expressions?
qlikvw2019
Contributor
Contributor
Author

ok May be i should restate my question.

 

Please suggest which Sheet object can be used to display rows of columns with a condition, STATUS=completed

dplr-rn
Partner - Master III
Partner - Master III

As mentioned you can use either if statements or set analysis.
to help with specifics. need sample data and desired output.
qlikvw2019
Contributor
Contributor
Author

Sory, this answer doesnt help much 😞

awaisqureshi
Contributor III
Contributor III

I sounds like dilipranjith's answer would be an ideal solution for this.

Maybe you can try putting one of the dimensions in the expressions by using the only function.

For example you want a table showing DimensionA, DimensionB, & DimensionC where Status=Complete.

You can have DimensionA & DimensionB as your dimensions and the following as an expression in your chart:

=only({<Status={'Complete'}>}DimensionC)

Let me know if that works for you.

kuba_michalik
Partner - Specialist
Partner - Specialist

You need an aggregation expression because otherwise you don't have a place to put the set analysis in.

But you can create a dummy one, like Sum({<Status={'Complete'}>} 1), and then hide it.

That's assuming you are using the Straight Table chart and not Table Box. For the latter it can't be done.

 

Alternatively, don't use Status as dimension, instead use a calculated dimension like =If(Status='Complete', Status). But I like the set analysis approach better.