4 Replies Latest reply: Nov 22, 2017 11:12 AM by Rishi Minawala RSS

    How to Create a FLAG Column in the Script by Dimension

    Rishi Minawala

      I need to create a flag column in the script for the below table.

       

      The condition is: if a single Trip Number e.g (00001) contains an [Expense Type] that has 'Meal A' and 'Meal B' then flag both rows with an 'X' in a separate column.

       

      I have tried a number of different things but not having any success,

       

      Any help would be much appreciated.

       

      Thanks in advance!!!

       

       

       

      Trip NumberExpense TypeAmount
      00001Meal A10.00
      00001Meal B15.00
      00001Air1000.00
      00002Meal A5.00
      00002Air

      800.00

      00002Taxi5.00

       

       

      Desired Output

      Trip NumberExpense Type

      Amount

       

      FLAG

      00001

      Meal A10.00X
      00001Meal B15.00X
      00001Air Meal A1000.00
      00002Air5.00
      00002Taxi800.00