2 Replies Latest reply: Jan 25, 2012 5:25 AM by andries Bos RSS

    chart: show the last price recorded and not the highest

    andries Bos

      I would like to show the last date registered for purchasing products and the latest price (not highest) connected to this product.


      I use  a chart where the fields shown are defined by: article  , max(DateofPurchase)  and price.  This will (as I filtered on latest date with the 'max') whos one record per article. However in this example the price wil be left blanc ( " - ").


      How could I get the attached latest price connected to this purchase date ?


      Source data:



      My chart should show the last purchase date (and this date's price).


      Chart Result:


      If I use max(price) , i will receive this maximum price (e.g. 13 for article 10.01 ), but this is not what i want : i'm looking for the price at the last date. Maybe somethin like =last(price)


      maybe using a filter like   =( { < Date = {$(Max(Date))} > }  would help, but somehow this syntax is not correct?


      Update : Adding the max value (although I just expected one answer)

      max ( {< Datum={$(=Max(Datum))} >}  Laatste_Prijs)   dit provide me with the correct answer... 


      Update 2: this solution will only work when filtering to one article, not wile showing a list of distinct articles.