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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

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