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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Delimiter - Split into New Field

Hi

I am endeavouring to build some analytics of our Community Centre where I volunteer.

We have all our rooms and halls in Outlook and I download each into an Excel file - We use the category function to band rates, but also to categorize use of main hall.

In my Excel file I end up with data like.

Sports Hall Full;Casual Use

Sports Hall Half;Reduced Community

Community

What I would like to acheive is splitting out the Sports Hall into another field. I have toyed around with subfield but not really getting the 'right' answer....

I would be grateful of some advice on how I may keep the data Casual Use, Reduced Community and Community in one field and Sports Hall type fields in another field.

Thanks in advance,


Rob

1 Solution

Accepted Solutions
Not applicable
Author

Thanks for your help that did the trick

For the sake of others that may follow the code was missing a close bracket at the end which I have updated below.

If(Index(DataField,';')=0,Null(),SubField(DataField,';',1)) as Field1,

If(Index(DataField,';')=0,DataField,SubField(DataField,';',2)) as Field2

Many thanks again for helping out.

View solution in original post

3 Replies
Not applicable
Author

Hi Rob, Please post some data in the Excel and what do you expect the table in QV.

nagaiank
Specialist III
Specialist III

You may try to split the data field into two as follows:

If(Index(DataField,';')=0,Null(),SubField(DataField,';',1) as Field1,

If(Index(DataField,';')=0,DataField,SubField(DataField,';',2) as Field2

Not applicable
Author

Thanks for your help that did the trick

For the sake of others that may follow the code was missing a close bracket at the end which I have updated below.

If(Index(DataField,';')=0,Null(),SubField(DataField,';',1)) as Field1,

If(Index(DataField,';')=0,DataField,SubField(DataField,';',2)) as Field2

Many thanks again for helping out.