Add row with same data based on column value

Hi all,

I have a question on how to insert a row based on a column value.
My need is to add a column when there is a difference between Column A date and Column B date:

  • when the difference is =0-> no new column
  • when the difference is <>0-> add a new column with the same data of the row but Column A value is replaced by Column B value.

I’ve tried with the Pivoting and unpivoting process but I don’t think it fits my need.

Many thanks

Hello Reader91,

Quick question about your dataset. Are you looking to do this for only one row, or do you need to perform this logic for a dataset?

If the latter, are you okay with missing values (?) being loaded into the new column?

Thank you for the answer

This rule must be done on a dataset and I don’t mind about missing values


Hello @Reader91,

are you adding new row or column in case difference is not zero? Anyways input data (dummy works just fine) and desired output help in these cases a lot…


1 Like

Hello Reader91, I am not sure what you mean by “add a new column with the same data of the row”. What is data of the row?

As per Ivan, sample of input data and desired output would help understand what you are explaining.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.