Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

Area:Dual

Hi all, can any 1 suggest a way 2 my problem:

****SCRIPT is

example:

LOAD dual(text,no) as [dual-example] from

[..\sample-data-for-dual.txt]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

****data in text file

text,no

high,1

medium,2

low,1

Requirement:

high,medium,low have 2 b displayed in qlik view. how to do?

problem:

dual.png

8 Replies

Re: Area:Dual

You cannot assign two different texts to the same number. In your text file, both high and low have the value 1. If you instead use

text,no

high,3

medium,2

low,1

it will work.

HIC

Not applicable

Re: Area:Dual

s henric i knew tat tell me a way of displaying all data by any way like concatenating with any new numbering like tat....as it is client requirement

Re: Area:Dual

Dual in combination with that requirement doesn't make sense. So, maybe you should discuss this with your client. Or you shouldn't use dual.

I see the following possibilities:

     no & '. ' & text as Field,

     Dual(no & '. ' & text, RecNo()) as Field,

HIC

Not applicable

Re: Area:Dual

i got when i scripted as:

example:

LOAD dual(text,no) as [dual-example] from

[..\sample-data-for-dual.txt]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

load Dual(text &'.' & no,RecNo()) as Fieldnew from

[..\sample-data-for-dual.txt]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

but not when i scripted as:

example:

LOAD dual(text,no) as [dual-example] from

[..\sample-data-for-dual.txt]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

load Dual(text &'.' & no,RecNo()) as Fieldnew resident example;

wat might b the reason henric?

Re: Area:Dual

If you make one single load (no load resident) like the following:

Load

     dual(text,no) as [dual-example1],

     Dual(text &'.' & no,RecNo()) as [dual-example2]

     From [..\sample-data-for-dual.txt] (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

What do you get then?

Further - Why do you want to use Dual()? What is the goal?

HIC

Not applicable

Re: Area:Dual

Hi henric,

resident load is used 2 load recently loaded tables right? Then y it throws error when i done as-

example:

LOAD dual(text,no) as [dual-example] from

[..\sample-data-for-dual.txt]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

load Dual(text &'.' & no,RecNo()) as Fieldnew resident example;

Re: Area:Dual

In your script, the table "example" does not contain any field called "text" or "no". With these fields lacking, the resident load will of course fail.

HIC

Not applicable

Re: Area:Dual

example:

LOAD dual(text,no) as [dual-example] from......

text,no will b stored as fields right n tat will b overridden by "dual-example"

Community Browser