cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
danielrsnyder
Frequent Visitor

Concatenate columns in query editor with delimiter

I am trying to concatenate 3  text columns into one column, separated by a semi colon, in query editor which sounds simple, but I am only getting null values?

 

I am trying to concatenate the three soft credit fields in the picture below. THanks in advance for your help!

 

Capture.PNG

 

 

 

1 ACCEPTED SOLUTION
ChrisMendoza
Super User
Super User

hello @danielrsnyder, I had the same results.

 

Try Text.Combine. Edit - of course that is assuming you do not have number in store credit.

 

= Table.AddColumn(#"Added Custom", "Text.Combine", each Text.Combine({[SoftCredit],[Soft Credit_1],[Soft Credit_2]},"; "))

1.PNG






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

4 REPLIES 4
ChrisMendoza
Super User
Super User

hello @danielrsnyder, I had the same results.

 

Try Text.Combine. Edit - of course that is assuming you do not have number in store credit.

 

= Table.AddColumn(#"Added Custom", "Text.Combine", each Text.Combine({[SoftCredit],[Soft Credit_1],[Soft Credit_2]},"; "))

1.PNG






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

Thanks @ChrisMendoza, that worked and is much simpler than my solution!

Greg_Deckler
Super User
Super User

Hmm, that's strange as that looks like the right syntax.


@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

I just did a nested if outside of the query editor and that works, but would have been a lot easier in the editor it seems.

 

Soft Credit = IF(not ISBLANK('Gifts Last Week'[Soft Credit_2]),'Gifts Last Week'[SoftCredit] & "; " & 'Gifts Last Week'[Soft Credit_1] & "; " & 'Gifts Last Week'[Soft Credit_2],if(AND('Gifts Last Week'[Soft Credit_2]=BLANK(),not ISBLANK('Gifts Last Week'[Soft Credit_1])),'Gifts Last Week'[SoftCredit] & "; " & 'Gifts Last Week'[Soft Credit_1],'Gifts Last Week'[SoftCredit]))

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.