Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
piekepotloed
Contributor II
Contributor II

Relationship problem

Hello,

I'm trying to create a data model to get this end result:

Stage# Students
noStage1
Stage21
Stage32

Table one contains Student data

StudentID
1
2

3

4

Table two contains for each student zero, one or more trajecten

StudentIDTrajectId
11
42
2

3

3

4

Table three contains for each traject the last action, if an action is available

TrajectIdLastActionId
113
215
418

Table for contains all the action records

TrajectIdActionIdStage
111Stage1
112Stage2
113Stage3
214Stage1
215Stage2
316Stage1
317Stage2
318Stage3
1 Solution

Accepted Solutions
Anonymous
Not applicable

Maybe sort it in the script like this ?

View solution in original post

7 Replies
Anonymous
Not applicable

Does the Straight Table Chart in the attached qvw amended from your's suffice ?

awhitfield
Partner - Champion
Partner - Champion

Hi Peter,

Straight table, Stage as dimension, expression = Count(StudentID) set Presentation 'Null Symbol' = No Stage'

HTH

Andy

piekepotloed
Contributor II
Contributor II
Author

Hi Bill,

It solves the problem in the chart...but I was also looking for a way to get a listbox where I can select the Stage. So I expect data like this:

StudentId  TrajectId Stage

  1                   1      Stage3

  2                   3      Stage3

  3                   4      NoStage

  4                   2      Stage2

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Straight Table :

Dimension : Stage

Expression: Count(Distinct StudentID)

Now in Properties -> Presentation -> Null Symbol-> Give NoStage

Hope this helps you.

Regards,

Jagan.

Anonymous
Not applicable

Maybe sort it in the script like this ?

sunilkumarqv
Specialist II
Specialist II

@Hi Peter

Create Dimensions  StudentId and Trajectid

suppress null value

expression

If(IsNull(Stage),'NoStage',Stage)

sunilkumarqv
Specialist II
Specialist II

=if(IsNull(Stage),'noStage',Stage)

same express ion use can use in list box