Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
This should be fairly easy. Given the following table:
Subject | Visit Date | Visit Reason |
---|---|---|
Arty | 1/1/2001 | Alpha |
Arty | 2/2/2002 | Beta |
Arty | 3/3/2003 | Delta |
Betty | 1/15/2015 | |
Betty | 2/16/2016 | Biff |
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 1 | Header 2 |
---|---|
Arty | 1/1/2001 - Alpha |
Betty | 1/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
Try this
Dimension
Subject
Expression
Date(Max([Visit Date])) & ' - ' & FirstSortedValue([Visit Reason], [Visit Date])
Try this
Dimension
Subject
Expression
Date(Max([Visit Date])) & ' - ' & FirstSortedValue([Visit Reason], [Visit Date])
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!