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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.