I have simplified my challenge. I am trying to unpivot two columns with three rows. The third row has a null value in both columns and when I unpivot, I lose that row which I do not want to. Have understood there was an issue at the source and this will be corrected going forward. How can I solve this issue?
I have attached an example file here. The last two columns need to be unpivoted and I need all rows.
Thank you, Brian. I now have six (double) the number of rows. I just need three rows. One with Carlton in the first column and Rita in the Value Column. The second row with Urmila and Adelaide and the third row with Mike and empty in the Value column.
@Carlton I am a little confused what you are trying to achieve with your data. Can you please clarify further?
Looking at your sample data, it would appear that FamOm only has valid values when Country = Oman, and FamKw only has valid values when Country = Kuwait.
If this is the case, there is no need to unpivot, you can simply merge the columns, and the row integrity will be maintained. You can then just remove the Country column if it is not needed.
Thank you @JasonCockington , This is exactly what I wanted. I was overthinking this with unpivoting when a simple column merge was the way to go. The row integrity was maintained.