Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

qliksus
Valued Contributor II

File Format Issue

Hi ,

I have a excel which have data lke

RegionNameRegionCode
AABO1 1,AB01 2,AC02 1,DB01 2 etc

No i want the output as

RegionNameRegioncode
AABO1 1
AAB01 2
AAC02
ADB01 2
A

Can anyone help me to sorted out?

Thanks in Advance.

3 Replies
MVP
MVP

Re: File Format Issue

Try

LOAD

     RegionName,

    subfield( RegionCode, ',') as RegionCode

FROM YourTable;

Not applicable

Re: File Format Issue

Hi,

you can do a SubField in the script:

A:

LOAD RegionName,

    RegionCode

FROM

C:\Users\ferrdani\Desktop\Community\Regions.xlsx

(ooxml, embedded labels, table is Sheet1);

B:

NoConcatenate

Load

    RegionName,

    SubField(RegionCode,',') as RegionCode

resident A;

Drop table A

Attached an example

qliksus
Valued Contributor II

Re: File Format Issue

Hi,

I have been using substring function for a long time, but never imagine it can be used without offset which will work as above requirement. Thanks for reminding mine old days to do exercise on functions again.

Thanks.