Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis on non-consecutive dates

LOAD * INLINE [
Test Date, Name, Score
01/01/2017, S1, 9
01/01/2017, S2, 5
01/01/2017, S3, 6
17/03/2017, S1, 9
17/03/2017, S2, 7
17/03/2017, S3, 7
03/05/2017, S1, 4
03/05/2017, S2, 10
03/05/2017, S3, 2
30/05/2017, S1, 8
30/05/2017, S2, 5
30/05/2017, S3, 8
31/05/2017, S1, 5
31/05/2017, S2, 5
31/05/2017, S3, 10
01/10/2017, S1, 5
01/10/2017, S2, 9
01/10/2017, S3, 9
]
;

I am trying to figure out how many students manage to keep a consecutive score  between 5 and 10 for 3 consecutive test date, to show that in both a text object , and also in a straight table.

Any idea?

Thank you

1 Solution

Accepted Solutions
sunny_talwar

The expression though shows an error, gives the output like this

Capture.PNG

View solution in original post

18 Replies
Anil_Babu_Samineni

Perhaps this?

Count({<Score = {">=5 <=10"}>} Name)

OR

Count({<Score = {">=5 <=10"}, [Test Date] = {'Date1','Date2','Date3'}>} Name)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

That is not taking into account the non consecutive dates business - or will need me to put all the dates manually into it - so no good, but thank you for trying

Anil_Babu_Samineni

I apologies, expected result?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

new dataset:

LOAD * INLINE [
Test Date, Name, Score
01/01/2017, S1, 9
01/01/2017, S2, 10
01/01/2017, S3, 6
17/03/2017, S1, 9
17/03/2017, S2, 7
17/03/2017, S3, 7
03/05/2017, S1, 4
03/05/2017, S2, 1
03/05/2017, S3, 2
30/05/2017, S1, 8
30/05/2017, S2, 1
30/05/2017, S3, 8
31/05/2017, S1, 5
31/05/2017, S2, 1
31/05/2017, S3, 10
01/10/2017, S1, 5
01/10/2017, S2, 10
01/10/2017, S3, 9
]
;

expected answer:

text object :2

straight table:

   

S1yes
S2no
S3

yes

surendraj
Specialist
Specialist

You can try Expression as

aggr(if(Count({<Score = {">=5 <=10"}>} Name)>=5,'Yes','No'),Name)

Capture.PNG

--Surendra

Anonymous
Not applicable
Author

Thank you

techvarun
Specialist II
Specialist II

Check the attached.

Anonymous
Not applicable
Author

actually that does not give correct answer - does not take care of the consecutive dates, it is a count on all date... but thank you for trying

I am trying to figure out how many students manage to keep a consecutive score between 5 and 10 for 3 consecutive test date, to show that in both a text object , and also in a straight table.

surendraj
Specialist
Specialist

Its working..You can Apply Order by while pulling the data!!