Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ambasadorknz
Contributor II
Contributor II

SUBFIELD() WITH row number

Hi,

I have small problem with subfiled() function

i have:

idtext
1asd,fgh
2qwe,rty,uio
3zxc

when i use

load

id,

subfield(text,',') as field_1

i get only part of my finally solution:(

i need row number per iteration

like below:

idfield_1ITER_NO
1asd1
1fgh2
2qwe1
2rty2
2uio3
3zxc1

Have you any idea how do row number per iteration??

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Table:

LOAD id,

  SubField(text, ',') as text,

  AutoNumber(RowNo(), id) as ITER_NO;

LOAD * INLINE [

    id, text

    1, "asd,fgh"

    2, "qwe,rty,uio"

    3, zxc

];

View solution in original post

2 Replies
sunny_talwar

Try this:

Table:

LOAD id,

  SubField(text, ',') as text,

  AutoNumber(RowNo(), id) as ITER_NO;

LOAD * INLINE [

    id, text

    1, "asd,fgh"

    2, "qwe,rty,uio"

    3, zxc

];

ambasadorknz
Contributor II
Contributor II
Author

Thanks Sunny_T .

Worked perfectly.