Skip to Content
Former Member
Sep 06, 2016 at 10:57 AM

Assign Value based on interrelated columns



I'm trying to give value for a column call STATUS, basically the requirement is as below:-

If Column1 = Value 1 and

If Column2 have the same values in all lines within a value of Column3 then give STATUS 'X'

If Column2 have different values within a value of Column3 value then give STATUS 'Y'


If Column1 <> Value1, "O".

Sorry if the above is a bit confusing, to support the above i provide an example:-

As you can see in above example, when Column2 with value AB is the same for all lines that have Column3 - "12345" thus the STATUS value will be set to "X", and if the values for Column2 are not the same across all lines for the Column3 - "23469", then the STATUS will be Y, else if Column1 is not Value1 then STATUS will be 'O'.

Appreciate if you guys can help with an example to perform this mapping in Query transformation.

Thanks In Advance


Pic1.JPG (19.6 kB)