8 Replies Latest reply: Feb 22, 2018 8:16 AM by RAM MUTHIAH M RSS

    Need Output based on logic given below

    RAM MUTHIAH M

      DATA_1:

      Load * Inline [

      Supplier, C1, C2,

      A, 100, 100,

      A, 200, 200,

      A, 300, 250,

       

      ];

       

      DATA_2:

      Customer, C1, C2,

      Load * Inline [

      B, 300, 300,

      B, 250, 250,

      B, 600, 600,

       

      ];

       

      I need the logic based on the Scenario 1 and 2:


      Scenario 1

      Supplier/Customer

      C1

      C2

      Check 1

      Check 2

      Check(if isnull(Check1),Check 2,Check 1))

      Score

      A

      100

      100

      TRUE

       

      TRUE

      FALSE

      A

      200

      200

      TRUE

       

      TRUE

      FALSE

      A

      300

      250

      FALSE

       

      FALSE

      FALSE

      B

      300

      300

       

      TRUE

      TRUE

      FALSE

      B

      250

      250

       

      TRUE

      TRUE

      FALSE

      B

      600

      600

       

      TRUE

      TRUE

      FALSE

      Scenario 2

      Supplier/Customer

      C1

      C2

       

       

      Check

      Score

      A

      100

      100

       

       

      TRUE

      TRUE

      A

      200

      200

       

       

      TRUE

      TRUE

      A

      300

      300

       

       

      TRUE

      TRUE

      B

      300

      300

       

       

      TRUE

      FALSE

      B

      250

      250

       

       

      TRUE

      FALSE

      B

      600

      500

       

       

      FALSE

      FALSE