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: 
ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Display Complete History of Next Value in List

Hi,

I have an interesting problem where I need to show a list of how an employee has performed in a certain type of evaluation. My client regularly sets tasks/tests for employees to complete during the course of a year. These are then displayed in a list along with the date have have or are scheduled to take them:

DateEmployeeTask
01/02/2016JohnBi-Monthly Ethics Exam
25/02/2016JohnSelf Assessment
01/03/2016JohnBi-Monthly Ethics Exam
15/05/2016PaulEntrant Exam
01/06/2016PaulBi-Monthly Ethics Exam

I have another table where a list of employees is displayed but instead of all their tasks, it only shows their next on. I did this using the formula:

FirstSortedValue({<Flag.UpcommingExam={1}>} Exam, Date)

What I want to know is it possible to create a table that ONLY shows a history of their next exam? I've tried a few variations of set analysis but not been successful so far. I would like to be able to select an employee and the table show their next exam along with their history ONLY for that exam, like below:

DateTaskHistory
01/01/2016Bi-Monthly Ethics ExamPass
01/02/2016Bi-Monthly Ethics ExamFail
01/03/2016Bi-Monthly Ethics ExamPass
01/04/2016Bi-Monthly Ethics ExamPass
01/05/2016Bi-Monthly Ethics ExamNot Done
1 Solution

Accepted Solutions
sunny_talwar

This?

Capture.PNG

You had a misplacement of = sign in your expressions:

Only({<Exam = {"$(=FirstSortedValue({<Flag.FutureExam={1}>} Exam, Date))"}>} Exam)

Only({<Exam = {"$(=FirstSortedValue({<Flag.FutureExam={1}>} Exam, Date))"}>} Result)

Or you can try this as well:

Dimensions

Employee

Date

=Aggr(If(FirstSortedValue(TOTAL {<Flag.FutureExam={1}>} Exam, Date) = Exam, Exam), Employee, Date)

Expression

Result

Capture.PNG

View solution in original post

6 Replies
sunny_talwar

May be it would be helpful for us to take a look at the qvw you are trying this out on. I think by looking at it, we might be able to offer better solutions.

ciaran_mcgowan
Partner - Creator III
Partner - Creator III
Author

Sorry Sunny,

Can't use the actual qwv so I'll see if I can replicate with some dummy data.

ciaran_mcgowan
Partner - Creator III
Partner - Creator III
Author

I've added a sample qvw. Same principle, just different results.

sunny_talwar

This?

Capture.PNG

You had a misplacement of = sign in your expressions:

Only({<Exam = {"$(=FirstSortedValue({<Flag.FutureExam={1}>} Exam, Date))"}>} Exam)

Only({<Exam = {"$(=FirstSortedValue({<Flag.FutureExam={1}>} Exam, Date))"}>} Result)

Or you can try this as well:

Dimensions

Employee

Date

=Aggr(If(FirstSortedValue(TOTAL {<Flag.FutureExam={1}>} Exam, Date) = Exam, Exam), Employee, Date)

Expression

Result

Capture.PNG

ciaran_mcgowan
Partner - Creator III
Partner - Creator III
Author

Thanks again Sunny!

I can't believe it was that simple! You're alternative solution also works great.