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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Experts,
Below is my table in Power Query
I am adding a Custom column using the if statement in Text.length, below is the power query
However, after adding the custom column I got this below error. I even tried changing the field type into ABC or 123 but still the same error.
Anyone, Please help!!
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
Adjust to the below:
if Text.Length([FLT_CLS_T]) =1 then "000"&([FLT_CLS_T]) else if Text.Length([FLT_CLS_T]) =2 then
"00"&([FLT_CLS_T]) else if Text.Length([FLT_CLS_T]) =3 then "0"&([FLT_CLS_T]) else [FLT_CLS_T]
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @Anonymous ,
Adjust to the below:
if Text.Length([FLT_CLS_T]) =1 then "000"&([FLT_CLS_T]) else if Text.Length([FLT_CLS_T]) =2 then
"00"&([FLT_CLS_T]) else if Text.Length([FLT_CLS_T]) =3 then "0"&([FLT_CLS_T]) else [FLT_CLS_T]
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.