Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Include values in list...?

Hi All,

I am trying to create a column which can then be used as an expression in a table. Below is what I would like but I am not sure how this is written.

Data Load Editor

LOAD

    orderid,

    type,

    IF(type= Match(type,'ZBC','XQC','XQH'),1,0) as TypeFlag

FROM [lib://L1-Tracking.qvd]

(qvd);


Table

Sum({<TypeFlag= {1}>}TypeFlag)

This will then filter my table for only the above-listed types.

Thank you in advance.

6 Replies
undergrinder
Specialist II
Specialist II

Hi Raman,

Try this:

Data Load Editor

LOAD

    orderid,

    type,

    IF(Match(type,'ZBC','XQC','XQH')>0,1,0) as TypeFlag

FROM [lib://L1-Tracking.qvd]

(qvd);

G.

vamsee
Specialist
Specialist

Hello Raman,

Your syntax for Match() in the data load editor is not appropriate.

https://help.qlik.com/en-

US/qlikview/November2017/Subsystems/Client/Content/Scripting/ConditionalFunctions/match.htm

Try

IF( Match(type,'ZBC','XQC','XQH'),1,0) as TypeFlag

Anonymous
Not applicable
Author

Hi Vamsee,

Thank this identifies the type correctly.

How would the expression in the table look? I tried Sum({<type= {1}>}type) but this does not work.

thanks

vamsee
Specialist
Specialist

Try Only.

Only({<Type={1}>}Type)


How to use - Only()

Anonymous
Not applicable
Author

Hi Vamsee,

I tried this but does not exclude rows that do not equal 1, it just sets them with a '-'.

Capture.PNG

undergrinder
Specialist II
Specialist II

If want to flag it with chart editor then use the expression you would use in load editor:

IF(Match(type,'ZBC','XQC','XQH')>0,1,0)