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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Guys
newbie to M - I was trying to add a column so that if it match the GL code , it will bring up a certain text ( a string) otherwise null. I was planning to repeat a series of this
But I can;t get past the "then" statement - it says " Token then expected" ... the attached diagram shld be self exlantatory. Pls help me fix this 🙂
Solved! Go to Solution.
if then else in Power Query does not need commas. You can take those out to avoid your error. Also, Null should be lowercase null
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
if then else in Power Query does not need commas. You can take those out to avoid your error. Also, Null should be lowercase null
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |