This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
How can I update,with powerquery, the first column of the attached photo with the data of the second if the value is different?
Tnks a lot
Gianni
Solved! Go to Solution.
Are the columns already in one table?
If not merge the two tables in power query on a common set of columns.
You can then create custom columns with if statements that take the 2nd value unless it's null in which case use the 1st.
Finally remove the old columns and renames the new ones correctly.
Hi,
The function you suggested gives me the same problem I had with a function I had already tried. The status "ORDERED" does not change to "DELIVERED"
Tanks
Gianni
Thanks to the immediate response.
Yes, they are already in a table.
I'm just starting out with custom columns. Can you tell me how to do it?
No problem.
I started with a demo table like this:
Then clicked Add Column >> Custom Column
Syntax I used was:
if [New Column A] = ""
then [Original Column A]
else [New Column A](Note that if, then and else have to be lower case in Power Query M )
Results in:
Depending on your source you might have nulls instead of empty text so the following is more hardened:
if [New Column A] = "" or [New Column A] = null
then [Original Column A]
else [New Column A]
Are the columns already in one table?
If not merge the two tables in power query on a common set of columns.
You can then create custom columns with if statements that take the 2nd value unless it's null in which case use the 1st.
Finally remove the old columns and renames the new ones correctly.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 33 | |
| 31 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 55 | |
| 31 | |
| 26 | |
| 23 |