Forum Discussion
Set a Custom Column to retrieve from the Correct column
Hi All Gurus,
Below are the two columns in my power query table. I wish to create a new column with the logic that if Col Period - Copy is not error, then it will take the value from Period - Copy, otherwise, it will take from column Period.
I have tried the custom column but the logic I know of doesn't work. Hope that I can find the solution here.
Hi kelvin-lkhca ,
How about this:
The Power Query M syntax for the custom column is:
try [#"Period - Copy"] otherwise [Period]
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
2 Replies
- tackytechtomMost Valuable Professional
Hi kelvin-lkhca ,
How about this:
The Power Query M syntax for the custom column is:
try [#"Period - Copy"] otherwise [Period]
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- kelvin-lkhFrequent Visitor
It works perfectly. I am so impressed by this formula which I had never come accross before.
Thank a lot!