Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help: How to separate one column into two??

Hello All,

     I have a column in my data, named Count: basically it counts the # of pcs or skids.. so this is what it would look like

Count
1 skid
4 skid

6pcs

2 pcs

4skid

so my question is, how do i separate them into two different columns named skid count and pcs count??

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

check out little example. I coded three versions, whatever fits best. comment or uncomment one of them.

I assumed that you want to seperate the column during the load. This is at leat better than in charts or so.

HtH

Roland

View solution in original post

10 Replies
MayilVahanan

HI

Try like this

Load *,if(WildMatch(Count,'*skid'),'Skid Count','Pcs Count') as TestField Inline

[

Count

1 skid

4 skid

6pcs

2 pcs

4skid

];

or

Load * Inline

[

CountTest

1 skid

4 skid

6pcs

2 pcs

4skid

] where WildMatch(CountTest,'*skid');

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
vgutkovsky
Master II
Master II

How about this:

if(substringcount(Count,'pcs')>0,Count) as PCSCount,

if(substringcount(Count,'skid')>0,Count) as SKIDCount

Regards,

Vlad

Not applicable
Author

Hi,

check out little example. I coded three versions, whatever fits best. comment or uncomment one of them.

I assumed that you want to seperate the column during the load. This is at leat better than in charts or so.

HtH

Roland

Not applicable
Author

Mr. Roland,

     You are absolutely Amazing!!!! Thank you so much for your help!!!

Not applicable
Author

Thank you so much Vlad

Not applicable
Author

Thank you so much!

Not applicable
Author

Hi again,

glad to help you

RR

Not applicable
Author

Mr. Roland,

     I realized there's a small flaw in your code, count!.png

if you look at the count, there are 2 4 skid, but if u look at the #skid1 table, there's only 1 4 shown.

can you tell me how to solve this??

Not applicable
Author

Hi Jim,

don't worry, this is correct.

QV "optimizes" several identical values of a field to one entry in a listbox. To proof this please check properties --> general tab --> show frequency.

Same feature can be found in tableboxes, if 2 or more complete rows are identical.

Roland