Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

andreyfcdk91
New Contributor III

Create flag with excluded value

Good day!

In my test model i have simple table:

Main:

load

City

from

City.xlsx

(ooxml, embedded labels, table is Sheet1);

 

City
City1
City2
City3
City4
City5
City6
City7

I need to create some flag in load script, which will have such values:

1. All cities - in this case it will filter all cities

2. w/o third - in this case it must exclude value City3

Thanks.

1 Solution

Accepted Solutions

Re: Create flag with excluded value

Try something like this

Main:

LOAD City

FROM

City.xlsx

(ooxml, embedded labels, table is Sheet1);

Final:

load *,

'All Cities' as Flag

Resident Main;

Concatenate (Final)

load *, 'w/0 third' as Flag

Resident Main

where City<>'City3'

order by City;

DROP Table Main;

4 Replies

Re: Create flag with excluded value

I need to create some flag in load script, which will have such values:

1. All cities - in this case it will filter all cities

2. w/o third - in this case it must exclude value City3

I don't understand what you're trying to do. Why do you need a flag field? Why not simply let the user select the cities or use bookmarks?


talk is cheap, supply exceeds demand

Re: Create flag with excluded value

test:

load

  City

from

City.xlsx

(ooxml, embedded labels, table is Sheet1);

Final:

Load RowNo() as No, City Resident test Order By City;

Left Join (Final)

Load City, '1' as Flag1 Resident test;

Left Join (Final)

Load City, '2' as Flag2 Resident Final Where No <> 3 Order By City;

Drop Table test;

Re: Create flag with excluded value

Try something like this

Main:

LOAD City

FROM

City.xlsx

(ooxml, embedded labels, table is Sheet1);

Final:

load *,

'All Cities' as Flag

Resident Main;

Concatenate (Final)

load *, 'w/0 third' as Flag

Resident Main

where City<>'City3'

order by City;

DROP Table Main;

pratap6699
Contributor

Re: Create flag with excluded value

after load Where city<> 3 Order By City

Community Browser