Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
leebaldwin
Helper I
Helper I

Trouble concatenating fields together in query

I am beginning to learn Power BI and have ran into an issue. I am connecting to an IBM AS400 system and pulling data with no issue; however, when I try to concatenate a few fields together I get an error:

[DB2 for i5/OS]SQL0170 - Number of arguments for function CONCAT not valid."

 

My custom query is as follows:

select DISTINCT fmwhse AS WAREHOUSE, fmstyl AS STYLE, fmclr AS COLOR, fmsize AS SIZE, fmback AS BACKING, concat(fmstyl,'.',fmclr,'.',fmsize,'.',fmback)

 

I know there are some differences in syntax, so it is probably something very minor that I am doing incorrectly. 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

If you want to create the concatenated column once the query is loaded, you can add a new column and use the option of "Column from examples"





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

3 REPLIES 3
leebaldwin
Helper I
Helper I

I solved this issue by inserting a new column and using CONCATENATEX. Took a lot of researching, but I finally found the solution I needed. Thank you @PaulDBrown for your assistance as your solution would work as well.

leebaldwin
Helper I
Helper I

@PaulDBrown Thanks for the quick reply. I would prefer to do it in the query. I am the type of user that prefers to automate as much upfront as possible. If there is no way to do it, that is fine, I will do it after I get the data into PBi, I am just used to being able to do it inside a query. 

PaulDBrown
Community Champion
Community Champion

If you want to create the concatenated column once the query is loaded, you can add a new column and use the option of "Column from examples"





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors