6 Replies Latest reply: Jul 27, 2015 11:21 AM by Sunny Talwar RSS

    Match expression using max(Date)

    Simon Brulotte

      Hi,

      I'd like to retrieve the latest text field for each specific type of values.

       

      ie:

            

      RuleDateComment
      R_AMO2015-07-11Fruit
      R_AMO2015-07-14Vegetable
      R_AMO2015-07-15Fruit
      R_SSG2015-07-11Vegetable
      R_SSG2015-07-12Fruit
      R_SSG2015-07-12Vegetable
      R_SSG2015-07-13Fruit
      R_SSG2015-07-13Vegetable
      R_SSG2015-07-14Fruit
      R_SSG2015-07-15Fruit
      R_SSG2015-07-15Vegetable
      R_SSG2015-07-16Vegetable

       

      Well the latest comment for R_AMO is Fruit, but the latest comment for R_SSG is Vegetable. Not that the latest date for R_AMO is 2015-07-15 but is 2017-07-16 for R_SSG.

       

      I've got this down as an expression for my dimension "Comment" in a chart.

      = if(match(Date, '$(=Max(Date))'), Comment, 'nay')

       

      All I get are Nays

      Any ideas on this?