Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Re: Help: How to separate one column into two??

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

10 Replies

Re: Help: How to separate one column into two??

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');

vgutkovsky
Honored Contributor II

Re: Help: How to separate one column into two??

How about this:

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

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

Regards,

Vlad

Not applicable

Re: Help: How to separate one column into two??

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

Re: Help: How to separate one column into two??

Mr. Roland,

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

Not applicable

Re: Help: How to separate one column into two??

Thank you so much Vlad

Not applicable

Re: Help: How to separate one column into two??

Thank you so much!

Not applicable

Re: Help: How to separate one column into two??

Hi again,

glad to help you

RR

Not applicable

Re: Help: How to separate one column into two??

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

Re: Help: How to separate one column into two??

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