Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
piekepotloed
New Contributor

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

Re: Relationship problem

Maybe sort it in the script like this ?

7 Replies

Re: Relationship problem

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

awhitfield
Esteemed Contributor

Re: Relationship problem

Hi Peter,

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

HTH

Andy

piekepotloed
New Contributor

Re: Relationship problem

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

MVP
MVP

Re: Relationship problem

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.

Re: Relationship problem

Maybe sort it in the script like this ?

sunilkumarqv
Valued Contributor II

Re: Relationship problem

@Hi Peter

Create Dimensions  StudentId and Trajectid

suppress null value

expression

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

sunilkumarqv
Valued Contributor II

Re: Relationship problem

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

same express ion use can use in list box

Community Browser