Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I'm trying to combine a basic column by using if sentences. However, this
=[Column1] & "/" & if [Column3] = null then [Column7] else ""
However, this produces error "Token Literal expetcted". What is wrong with this simple command..?
Thanks!
Solved! Go to Solution.
Just use Text.Combine Text.Combine - PowerQuery M | Microsoft Docs
The formula would be like this:
Text.Combine({[Column1], if [Column3] = null then [Column7] else ""}, "/")
All you need to do to fix this is put parentheses around the if statement so that it evaluates the expression in the order you intend.
= [Column1] & "/" & (if [Column3] = null then [Column7] else "")
Just use Text.Combine Text.Combine - PowerQuery M | Microsoft Docs
The formula would be like this:
Text.Combine({[Column1], if [Column3] = null then [Column7] else ""}, "/")
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 |
|---|---|
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 19 | |
| 14 | |
| 14 | |
| 10 | |
| 9 |