7 Replies Latest reply: Oct 13, 2011 1:45 PM by Kiran Rokkam RSS

    Select the latest dated record for each group

      I have an example QVW attached.  I am trying to create a variable expression to count a number of "assessments"  However each "resident" has multiple "assessments",  I only want to count the one for each resident with the most current date.  I have tried using the max function and firstsortedvalue but it is not working.


      Resident1     AssessmentA1     1/1/2011

      Resident1     AssessmentB1     4/1/2011

      Resident2     AssessmentA2     4/1/2011

      Resident2     AssessmentB2     1/1/2011


      In this case I would only have a count of 2 for AssessmentB1 and AssessmentA2.