Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

extracting data using subfield?

Hi Guys,

I have an order number that has multiple (up to 20) reference numbers.

I'm trying to extract a field called reference numbers. These numbers are now horizontal displayed. See screenshot.

refnumber.png

The problem is that I can't select 1 reference number. Instead I have to select 2/3 or more reference number in the reference field.

If I use the subfield statement I can only select one reference number e.g. Subfield(refnumber, ',', 1) would display the first reference number that's behind a comma that goed the same for subfield(refnumber, ',', 2), I would only get the second ref number .

How can I get all the ref. number vertically so I can select 1 reference number rather than 3 or more?

The other problem is that some ref. numbers are on the left side while others are on the right. Does that mean that qlikview does not recognize them as numbers?

Hope someone can help!

Thanks!

isam

1 Solution

Accepted Solutions
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi,

Use Subfield(ReferenceNumber,',') AS RefNumber

It will give you all the reference number in row.

View solution in original post

4 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi,

Use Subfield(ReferenceNumber,',') AS RefNumber

It will give you all the reference number in row.

Anonymous
Not applicable
Author

Thanks Vijay, I expect that the solution would be so easy! I was thing of al sorts of if senario's.

Thanks man!

SunilChauhan
Champion
Champion

in script use below

if(istext(refnumber)=0,text(refnumber),refnumber) as referenceno

then apply subfield

hope this helps

Sunil Chauhan
Anonymous
Not applicable
Author

Thanks Sunil for your help!!