Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vincent_bellang
New Contributor III

Table Creation

Greetings,

I need enlightements on some basics.

First of all, I've a file which contains data like this :

Kevin, Anne-De-Bretagne Harvard

Jean, School School School School

Basically it just contains a Name and the differents Schools the student has study to.

I need to be able to select a school in a sheet and it will only show the student that have been to this school, but i've no idea how to structure my data model to fit that.

I thought about creating 2 different table one with names and the other with schools but that means i need to write all of the school in the school table and there can be a lot of them for one student.

Thanks for all the answers/advice !

Tags (2)
1 Solution

Accepted Solutions
undergrinder
Valued Contributor II

Re: Table Creation

Hi Vincent,

So the school column can contains multiple school.

Try this:

Schools:

Load

     Name,

     splitfield(school,' ') as school

Resident/From

;

After the transformation your table look like below:


Kevin, Anne-De-Bretagne

Kevin,Harvard

Jean, School

Jean, School

Jean, School

Jean, School


The splitfield second parameter is the delimiter of data, and if omitted the 3rd param (which part should return) it returns all of them in multiple rows (like unnest of postgreSQL)


G.

4 Replies
undergrinder
Valued Contributor II

Re: Table Creation

Hi Vincent,

So the school column can contains multiple school.

Try this:

Schools:

Load

     Name,

     splitfield(school,' ') as school

Resident/From

;

After the transformation your table look like below:


Kevin, Anne-De-Bretagne

Kevin,Harvard

Jean, School

Jean, School

Jean, School

Jean, School


The splitfield second parameter is the delimiter of data, and if omitted the 3rd param (which part should return) it returns all of them in multiple rows (like unnest of postgreSQL)


G.

YoussefBelloum
Esteemed Contributor

Re: Table Creation

Hi undergrinder

there is no Splitfield function.. you were thinking about Subfield() maybe ?

undergrinder
Valued Contributor II

Re: Table Creation

Hi,

I'm sorry, I was thinking about subfield(), you're right

G.

YoussefBelloum
Esteemed Contributor

Re: Table Creation

it can be confusing because it really split the field

it is also a solution here.