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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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