Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
rsingh43
Contributor

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.

Tags (3)
6 Replies
undergrinder
Valued Contributor II

Re: Include values in list...?

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
Valued Contributor

Re: Include values in list...?

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

rsingh43
Contributor

Re: Include values in list...?

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
Valued Contributor

Re: Include values in list...?

Try Only.

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


How to use - Only()

rsingh43
Contributor

Re: Include values in list...?

Hi Vamsee,

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

Capture.PNG

undergrinder
Valued Contributor II

Re: Include values in list...?

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)