2 Replies Latest reply: Nov 17, 2011 3:07 PM by tiffanyhuff4 RSS

    Chart Expression (Return TestID Where TestDate is Max TestDate)

      Data (in a Table Box) looks like this:

       

      PersonIDTestFlagTestIDTestDate
      1234B01D410F-4796-450D4/1/2010
      12341C9B4F060-A6FF-4D35/5/2011
      123437FD7369-075E-4CBC3/16/2011
      1234F063F7A6-C055-46054/14/2011
      1234AC5396D2-2454-4F924/29/2011
      1234096F11C7-CEAB-414C5/11/2011
      123416D02D475-56D8-4A1D6/6/2011
      1234187BBA227-2036-482B10/17/2011

       

       

       

       


      I'm trying to create a Straight Table that looks like this:

       

      PersonIDTestFlagMOST RECENT TestIDMOST RECENT TestDate
      1234187BBA227-2036-482B10/17/2011

       

      In other words, please give me the most recent TestID and TestDate where the TestFlag = 1 (by PersonID).

       

       

       

       

       

      Currently, I have the Dimension as PersonID, and my Expression looks like this:

       

      MaxString(

      {$<
      TestDate = {"=$(Max(TestDate))"},
      TestFlag = {1}
      >}
      TestID)
      But this is not returning anything...
      Please help.