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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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!



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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.