Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

Load three columns as one

Hi guys,

My data has three columns: VISIT, CONTRACT, ORDER. In data load editor, I want to load this three columns as one column called ACTIVITY. Something like: LOAD (VISIT, CONTRACT, ORDER) AS ACTIVITY. What is the proper grammar?

Thanks!

1 Solution

Accepted Solutions
OmarBenSalem
Esteemed Contributor

Re: Load three columns as one

t:

load * Inline [

col1,col2,col3

A,D,G

B,E,H

C,F,I

];

Load col1 as Final Resident t;

Load col2 as Final Resident t;

Load col3 as Final Resident t;

drop table t ;

result: (per analogy)

Capture.PNG

15 Replies

Re: Load three columns as one

May be this

LOAD VISIT&CONTRACT&ORDER AS ACTIVITY

wanyunyang
Contributor

Re: Load three columns as one

If VISIT has A,B,C, CONTRACT has D,E,F, ORDER has G,H,I, LOAD VISIT&CONTRACT&ORDER AS ACTIVITY will generate 3*3*3 (ADG, ADH...) results. I want it to be A,B,C,D,E,F,G,H,I.

Re: Load three columns as one

Three different tables?

wanyunyang
Contributor

Re: Load three columns as one

One table, three columns

zebhashmi
Valued Contributor

Re: Load three columns as one

So you need only one row in your field?

wanyunyang
Contributor

Re: Load three columns as one

I want to get one column with values A,B,C,D,E,F,G,H,I, not ADG, ADH...

zebhashmi
Valued Contributor

Re: Load three columns as one

Maybe you are looking to concatenate the fields

LOAD

VISIT AS ACTIVITY,

CONTRACT AS ACTIVITY,

ORDER AS ACTIVITY

From


Or Maybe


Name:

Load

VISIT AS ACTIVITY

From

Load

CONTRACT AS ACTIVITY

From

Load

ORDER AS ACTIVITY

From

wanyunyang
Contributor

Re: Load three columns as one

The following error occurred:

Field names must be unique within table

zebhashmi
Valued Contributor

Re: Load three columns as one

Name:

Load

VISIT AS ACTIVITY

From

Load

CONTRACT AS ACTIVITY

From

Load

ORDER AS ACTIVITY

From


Community Browser