Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
onetwothree123
Partner - Contributor III
Partner - Contributor III

Loading single column Excel in Qlikview

Currently I have excel in following format (see attachment)

Month_ and regions in same column.

I'm trying to separate them in two different columns while keeping the association

like

RegionColumn              Months

California                      Month_201107

California                      Month_201108

Desert Mountain           Month_201107

Desert Mountain           Month_201108

and so on.

I'm not able to achieve it , Any help would be appreciated

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try this:

Temp:

LOAD

          IF(IsNum(SubField(A,'_',2))=0,A,Peek('Region'))                    AS          Region

          ,IF(IsNum(SubField(A,'_',2)),SubField(A,'_',2),0)          AS          Month

FROM

(ooxml, no labels, table is Sheet1)

WHERE NOT IsNull(A);

Data:

NoConcatenate

LOAD

          *

RESIDENT Temp

WHERE Month <> 0;

 

DROP TABLE Temp;

Hope this helps,

Jason

View solution in original post

2 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try this:

Temp:

LOAD

          IF(IsNum(SubField(A,'_',2))=0,A,Peek('Region'))                    AS          Region

          ,IF(IsNum(SubField(A,'_',2)),SubField(A,'_',2),0)          AS          Month

FROM

(ooxml, no labels, table is Sheet1)

WHERE NOT IsNull(A);

Data:

NoConcatenate

LOAD

          *

RESIDENT Temp

WHERE Month <> 0;

 

DROP TABLE Temp;

Hope this helps,

Jason

onetwothree123
Partner - Contributor III
Partner - Contributor III
Author

Thank you Jason