Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi all
I am doing a concatenation of text and numbers with power query, the formula I use is:
if [#"[ L1.4 - Refillability ]"] ="Fountain" then [Refilability]&" "&[#"[L1.7 - Bev Category]"]&" "&[Size conversion]
else if [Container] = "TETRA" or [Container] = "CAN" then [Container]&" "&[#"[L1.7 - Bev Category]"]&" "&[Size conversion]
else [Refilability]&" "&[Container]&" "&[#"[L1.7 - Bev Category]"]&" "&[Size conversion]
The error I get it is:
Expression.Error: We cannot apply operator & to types Text and Number.
The [size conversion] is in number format. I tried on my code number.toText ([Size conversion]) but still got an error.
How can I fix my code while leaving size conversion as number and not text?
Thanks.
Solved! Go to Solution.
Hi @o59393
Your [size conversion] is already a text column, please do not use "Number.ToText" before this column.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks
Hi @amitchandak
I did add it and got an error
if [#"[ L1.4 - Refillability ]"] ="Fountain" then [Refilability]&" "&[#"[L1.7 - Bev Category]"]&" "&Number.ToText([Size conversion])
else if [Container] = "TETRA" or [Container] = "CAN" then [Container]&" "&[#"[L1.7 - Bev Category]"]&" "&Number.ToText([Size conversion])
else [Refilability]&" "&[Container]&" "&[#"[L1.7 - Bev Category]"]&" "&Number.ToText([Size conversion])
Error is:
Thanks!
Hi @o59393
Your [size conversion] is already a text column, please do not use "Number.ToText" before this column.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |