Forum Discussion

nnouchi's avatar
nnouchi
Icon for Helper I rankHelper I
7 years ago
Solved

Power Query - ReplaceValues with two conditions

Greetings PBI Community,   I'm trying to reassign a value in a Customer Orders table that is based off of two conditions from columns within that Customer Orders table. I've found that I need to us...
  • ImkeF's avatar
    7 years ago

    As an alternative, you could add a new column with the correct values and delete the old column.

     

    That would enable you to work with a "replacements table" that you join on [Customer_ID] and [SM_Region] to your Customer Orders table.

     

    Expand the new value and add a new column that checks if the new value is not null -> take the new value  - otherwise - take the value from the original column.

     

    Less typing and probably easier to maintain.