5 Replies Latest reply: Nov 27, 2013 12:20 PM by Clever Anjos RSS

    Chart Expression Problem

    Mario Hölzer

      Hello,

       

      starting point is a table with multiple columns, where two columns are relevant to my problem. This is an item ID and a date. I want to get displayed in my table only the items which have the smallest date per item. If there are the same dates for a item then show a random datarow or the row with the smallest PrimaryKey(PK).

      Anyone a solution for that?

       

      For example:

       

      Rawdata:

      Item ID, Date, PK, colx, coly

      1, 12.12.2012, 1, xxx, yyy

      1, 12.12.2012, 2, xx2, yy2

      1, 18.12.2012, 3, xyz, yxz

      2, 02.01.2013, 4, aaa, bbb

      3, 08.01.2013, 5, ccc, ddd

      3, 09.01.2013, 6, abc, ddd

      4, 04.04.2013, 7, ddd, ttt

       

      ResultTable:

      Item ID, Date, PK, colx, coly

      1, 12.12.2012, 1, xxx, yyy (or 12.12.2012, 2, xx2, yy2)

      2, 02.01.2013, 4, aaa, bbb

      3, 08.01.2013, 5, ccc, ddd

      4, 04.04.2013, 7, ddd, ttt

       

       

      Thank You!