Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table Data

Hi experts please help me.

I have a table with data like

Table

IDNAME
1a,b,c
2d
3x,y,z

but i want the output should be like

IDNAME
1a
1b
1c
2d
3x
3y
3z

how i can get the result please experts help me.

3 Replies
MK_QSL
MVP
MVP

Load

     ID,

     SubField(NAME,',') as NAME

From .....

its_anandrjs

Load your table like below script

Table:

LOAD

          ID,

          SubField(NAME,',') as Name

FROM

ExcelSource.xlsx

(ooxml, embedded labels, table is Sheet1);

maxgro
MVP
MVP

answer above

explanation from online help

subfield(s, 'delimiter' [ , index ] )

In its three-parameter version, this script function returns a given substring from a larger string s with delimiter 'delimiter'. index is an optional integer denoting which of the substrings should be returned. If index is omitted when subfield is used in a field expression in a load statement, the subfield function will cause the load statement to automatically generate one full record of input data for each substring that can be found in s.

In its two-parameter version, the subfield function generates one record for each substring that can be taken from a larger string s with the delimiter 'delimiter'. If several subfield functions are used in the same load statement, the Cartesian product of all combinations will be generated.

Examples:

(For three parameters)

subfield(S, ';' ,2) returns 'cde' if S is 'abc;cde;efg'

subfield(S, ';' ,1) returns NULL if S is an empty string

subfield(S, ';' ,1) returns an empty string if S is ';'