Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
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/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
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/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
It works perfectly. I am so impressed by this formula which I had never come accross before.
Thank a lot!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |