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
sgross
Helper I
Helper I

Custom Concatenated Column: A + B, but also just A, if no value is provided for B

I'm trying to concatenate a [Full Title] column, combining values from a [Title] column and a [Subtitle] column. That bit seems pretty easy; "= [Title] & " " & [Subtitle]"

 

But some of the books don't have subtitles, so the concatenated column throws up a null.

 

How can I get the column to display the information it does have, even when the second value is missing?

1 ACCEPTED SOLUTION

I resolved the issue using Column From Examples to create a combined column 🙂

 

Thanks for the help!

View solution in original post

5 REPLIES 5
MFelix
Super User
Super User

Hi @sgross,

 

Use this formula

 

= [Title] & " " & IF(ISBLANK(T[Subtitle]),"",[Subtitle])

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hmm... Using that exact forumula I'm receiving an Expression Error:

Expression.Error: The name 'IF' wasn't recognized.  Make sure it's spelled correctly.

Are you in the power query view? If so the formula needs to be

if...then....else

Regards

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I'm sorry, I don't understand what you mean. Here's a screenshot of what I'm looking at right now in the Query Editor:

 

BI Screenshot.png

I resolved the issue using Column From Examples to create a combined column 🙂

 

Thanks for the help!

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.