Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Contributor III
Contributor III

Re: How to add Where clause to Straight table expression

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
Highlighted
Partner
Partner

Re: How to add Where clause to Straight table expression

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/
Highlighted
Contributor
Contributor

Re: How to add Where clause to Straight table expression

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

Highlighted
Partner
Partner

Re: How to add Where clause to Straight table expression

You dont have any expressions?
Highlighted
Contributor
Contributor

Re: How to add Where clause to Straight table expression

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

Highlighted
Partner
Partner

Re: How to add Where clause to Straight table expression

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

Re: How to add Where clause to Straight table expression

Sory, this answer doesnt help much 😞

Highlighted
Contributor III
Contributor III

Re: How to add Where clause to Straight table expression

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

Highlighted
Partner
Partner

Re: How to add Where clause to Straight table expression

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.