4 Replies Latest reply: Aug 16, 2013 1:01 PM by Debora Sandonato RSS

    Table based on two condition (with Muiltiple ID)

    Debora Sandonato

      I have one table like:

       

      ID,               Type,               Status

      AAA1          After                    B

      AAA1          Before                A

      AAA2          After                    A

      AAA2          Before                A

      BBB1          After                    B

      BBB1          Before                A

      BBB3          After                    A

      BBB3          Before                C

      DDD5          After                    A

      DDD5          Before                C

      DDD4          After                    A

      DDD4          Before                B

      FFF2          After                    A

      FFF2          Before                A

      GGG5          After                    A

      GGG5          Before                C

       

      I want to create a table with a function that compares the field "Status" when Type is like "Before" and "After" and just appears ID once. Like that:

       

      ID,          Status Before,          Status After,          Changed?

      AAAA1     A                                   B                            YES

      BBB1     A                                   B                            YES

      BBB3     C                                   A                            YES

      DDD4     B                                   A                            YES

      DDD5    C                                   A                            YES

      FFF2     A                                   A                            NO

      GGG5     C                                   A                            YES

       

      How could I make this?

       

      Thak you!