Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Concatenate, but skip over blank value

(0) ShareShare
ReportReport
Posted on by

Hello - 

I'm looking to concatenate the values from a selected record from 5 columns: 

Address

Address2

City

State

Zip

So that when the formula is executed, I have something like this: Address, Address2, City, State Zip

Here is the formula that I've written 

Concatenate(varSelectedLoc.Address,", ",varSelectedLoc.Address2,", ",varSelectedLoc.City,", ",varSelectedLoc.State," ",varSelectedLoc.Zip)
Address2 often has a blank value in my table, but not in every situation.  Is there any way that this formula can be amended to skip over the blank value so that I still come up with something like this: Address, City, State Zip?
  • Verified answer
    LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Concatenate, but skip over blank value

    Hi @jessicadduffey,

     

    If only Address2 may sometimes be empty, you could use the following approach:

    $"{varSelectedLoc.Address}, {If(!IsBlank(varSelectedLoc.Address2), varSelectedLoc.Address2 & ", ")}{varSelectedLoc.City}, {varSelectedLoc.State}, {varSelectedLoc.Zip}"

    In this case we use string interpolation to improve readability and use an If statement to only display Address2 when it has a value. (I have also added a comma between State and Zip.)

     

    If we expect multiple fields to possibly be empty, we may need a more dynamic approach.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard