Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
srinivas1921
Contributor III
Contributor III

how to add a condition on straight table

Hi,

I have created document using straight table with Fields are fileld-1,fileld-2,fileld-3,filed-4.I want to add condition(where field-5='X') on this chat and I used this fileld-5 for applying condition without adding this column to straight table.

kindly provide me solution for this.

Many thanks for your valuable support.

5 Replies
qlikviewwizard
Master II
Master II

Hi Srinivas,

Use the script as below:

Data:

LOAD * , WildMatch(fileld5,'X') as New_fileld5;

LOAD * INLINE [

fileld1,fileld2,fileld3,filed4,fileld5

1,a,b,c,X

1,a,b,d,Y

2,a,b,t,X

1,a,b,d,X

1,e,f,t,X

1,a,e,v,Y

2,a,b,t,X

1,a,b,t,X

];

Capture.JPG

srinivas1921
Contributor III
Contributor III
Author

But I don't want to see the Field-5 on the Straight Table.Just used this field for using condition on this chat  only.

Kindly provide me solution for this.

jonathandienst
Partner - Champion III
Partner - Champion III

Add the following set expression to your expression(s) for the table:

     {<[Field-5] = {'X'}>}

For example:

     Sum({<[Field-5] = {'X'}>} Amount)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

Hi,

Try using Set analysis in your expression and don't add Field5 in Dimensions:

SUM({<Field5={"X"}>} [SalesAmount])

qlikviewwizard
Master II
Master II

Hi Srinivas,

Did you manage to get the solution?