Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

Finding column value associated with minimum value in another column

Hello,

This should be fairly easy.  Given the following table:

SubjectVisit DateVisit Reason

Arty

1/1/2001Alpha
Arty2/2/2002Beta
Arty3/3/2003Delta
Betty1/15/2015
Betty2/16/2016Biff

I want to create a Table Listing of Subjects with the date of their first visit and, if provided, the visit reason concatenated to the date. Ex:

Header 1Header 2
Arty1/1/2001 - Alpha
Betty1/15/2015

I've got my Table Listing defined with Subject as Dimension #1, and I can define min([Visit Date]) to get the first visit, but I'm not sure of the rest of the expression I need to get the Visit Reason associated with that date.

Thanks for any help.

Steve

1 Solution

Accepted Solutions

Try this

Dimension

Subject

Expression

Date(Max([Visit Date])) & ' - ' & FirstSortedValue([Visit Reason], [Visit Date])

View solution in original post

2 Replies

Try this

Dimension

Subject

Expression

Date(Max([Visit Date])) & ' - ' & FirstSortedValue([Visit Reason], [Visit Date])

View solution in original post

Partner
Partner

Once again, Sunny to the rescue!

I'd never heard of the FirstSortedValue function before, so I learned something new today.

Thank you very much!