4 Replies Latest reply: Mar 16, 2014 8:11 PM by Joseph Dalton RSS

    Nested set analysis and date comparisons

    Joseph Dalton

      I am trying to figure out the correct syntax to say "Find the minimum date for Item B which occurred after the minimum date for Item A".

      For example, using the following table:

      IDItemItemDate
      1A1/1/2009
      1B1/1/2010
      2A1/1/2011
      2B1/1/2010


      I tried to use the following expression in a straight table, with ID as the dimension:

      =min({<Item={'B'},ItemDate={">min({<Item={'A'}>} ItemDate)"}> ItemDate)


      I am currently getting a null for both IDs, but I would expect it to say "1/1/2010" for ID 1 and null for ID 2

       

      This needs to be done as a set analysis expression because I'm planning on using it for a more complicated query which has to be done this way.