6 Replies Latest reply: Jan 11, 2012 5:34 PM by Pierre Philippon RSS

    Set Analysis - Getting previous day data

      Good morning

      I have a table with DateD and Price fields.
      In a straight table, I would like to get the Price for current selected DateD, but also for the previous DateD

       

      I manage to get the Previous DateD value with the formula =Date(Only(DateD)-1) or even =FiedlValue('DateD', FieldIndex('DateD',DateD)-1)
      I also manage to get the Prcie at specified DateD, for exemple =Sum({$<DateD={'02/11/2011'}>} Price)

       

      But I do not manage to aggregate the two formulas to get the Price at the DateD before the selected DateD.
      I am also unsure if there is a way not to use the Sum function, as what I really want is a field value, not a sum, but as there is only one value, the sum eqauls the value, so it does not really matter. But still maybe there is a better function than the sum I am using.

       

      Many thanks for your help.