Forum Discussion

ThenNumbersGuy's avatar
ThenNumbersGuy
New Member
7 years ago
Solved

How to replace null values in a column from another column

I have a few null values in column A " Month (End Date)" and Column B ("Year (End Date)" that I want to replace with values from Column C (Month ("Approved Date)") and Column D ("Year (Approved Date)...
  • Anonymous's avatar
    Anonymous
    7 years ago

    You can do this in Power Query pretty easily by adding a custom column with the following code:

    if
    Month[End Date] = null then
    Month [Approved Date] 
    else
    Month [End Date]

    This will create a column that has no nulls and either the Month Approved Date or the Month End Date. You then can remove both the End Date and Approved date columns if you want.  

     

    Just repeat for the Year End column