Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I need to splitout a data field on data load into two columns

I need to be able to split a value in a table to create two fields in my dashboard

i have a field that contains a three digit code and I need to populate the first two digits into one column and the last digit into another column, What is the easiest way to do this

example : X1A

and I need

X1    and A in seperate column

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Like this.

Temp:

Load * Inline

[

Text

X1A

];

Main:

load *,

Left(Text,2) as F1,

Right(Text,1) as F2

Resident Temp;

drop table Temp;

Regards

ASHFAQ

View solution in original post

3 Replies
Not applicable
Author

easiest way will be two separate expressions

1; left(Fieldname,2)

2: right(Fieldname,1)

1 takes only the first 2 digits from the left

2 takes only the first digit from the right.

ashfaq_haseeb
Champion III
Champion III

Like this.

Temp:

Load * Inline

[

Text

X1A

];

Main:

load *,

Left(Text,2) as F1,

Right(Text,1) as F2

Resident Temp;

drop table Temp;

Regards

ASHFAQ

Not applicable
Author

ay yep...Ashfaq's way will work in Dataload