Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Repeated measure analysis

Hi,

I am new to qlik and need some help.

I have a table with repeated measures.

Each row in the table contains data of a single measure for a single ID.

Example:

IDDateStageTotal
171148,0008/10/2010Assessment7,80
171148,0010/01/2011Demission10,30
171149,0009/09/2010Assessment19,10
171149,0017/01/2011Demission19,70
171150,0006/09/2010Assessment12,80
171150,0017/01/2011Demission9,40
171151,0025/08/2010Assessment6,20
171152,0009/11/2010Assessment18,50
171152,0012/01/2011Assessment14,70
171152,0015/02/2012Intermediate10,30
171153,0009/11/2010Assessment13,80
171153,0013/01/2011Assessment13,20
171153,0015/02/2012Demission14,10
171153,0020/05/2014Demission15,30
171154,0018/10/2010Assessment12,90
171155,0025/08/2010Assessment13,30
171156,0001/10/2010Assessment20,60
171157,0019/10/2010Assessment23,50
171157,0021/02/2012Intermediate30,30
171157,0009/05/2012Intermediate22,40
171158,0030/11/2010Assessment17,10
171159,0001/12/2010Assessment15,60
171159,0009/02/2011Intermediate7,40
171159,0006/10/2011Intermediate7,10
171160,0021/02/2010Assessment23,50
171160,0010/02/2011Intermediate3,80
171161,0024/08/2010Assessment18,50
171162,0011/01/2010Assessment11,50
171162,0015/03/2010Demission5,90
171163,0011/01/2010Assessment10,60
171163,0015/03/2010Demission1,80
171164,0007/12/2010Assessment21,80
171165,0027/10/2006Assessment21,80
171165,0021/12/2010Intermediate10,60
171165,0019/07/2011Intermediate10,60
171165,0006/03/2012Intermediate12,60
171165,0029/01/2013Demission11,20
171166,0030/11/2010Assessment13,80
171167,0028/12/2010Assessment21,50
171167,0019/01/2014Intermediate24,70
171167,0006/05/2014Intermediate18,80
171179,0009/09/2010Assessment11,50
171180,0027/09/2010Assessment20,00
171181,0009/09/2010Assessment10,90
171181,0010/01/2011Demission9,40
171182,0006/09/2010Assessment15,90
171182,0010/01/2011Demission5,60
171183,0006/09/2010Assessment9,70
171183,0010/01/2011Demission10,90

I would like to calculate for each single ID the difference between the Totals of the first measurement and the last measurement where there is repeated measures. The condition for the first measurement is that it should be the first measure when stage is 'Assessment' and for the last measurement that it should be the last measure when stage is either 'Intermediate' or 'Demission'.

Furthermore, I also need the difference in between the Date of the first measurement and the last measurement in days.

Thanks

Daniel de Wet

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Hello Daniel, try a straight table with ID as dimension and with 3 expressions:

1)

sum

({<Stage={'Assessment'},Date={"$(=Min(Date))"}>}TotalN)

2)

sum

({<Stage={'Demission', 'Intermediate'}, Date={"$(=max(Date))"}>}TotalN)

3)

Column

(1)- Column(2)

TotalN is oyur Total filed, but I have some issues because Total is a jey word

KR

Elena

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw.


talk is cheap, supply exceeds demand
francoiscave
Partner - Creator III
Partner - Creator III

Hi Daniel,

The best document to manipulate Set Analysis:

Set Analysis: syntaxes, examples

By Fabrice Aunez.

It will be helpful !

François

Not applicable
Author

Thanks for the Reply Elena

Not applicable
Author

Thanks Gysbert!!!

Not applicable
Author

Thanks François!

Daniel