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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Concatenate if field if not null?

I have a new column created using this formula:

Const Year-Quarter = CONCATENATE('Properties'[Const-Y]&"-", "Q"&'Properties'[Const-Q])
 
I would like to update this formula to concatenate If Const-Y is not null. If Const-Y is null, then return blank. 
 
Lil help? 🙂 
2 REPLIES 2
Anonymous
Not applicable

 

[Const Year-Quarter] =
var Year_ = Properties[Const-Y]
var Quarter_ = Properties[Const-Q]
RETURN
    if(
        NOT ISBLANK( Year_ ),
        Year_ & "-Q" & Quarter_
    )

 

bongmw
Helper I
Helper I

Hi @Anonymous 

you can pretty easily have an IF statement within your CONCATENATE like:

 

Const Year-Quarter =
CONCATENATE (
    IF ( NOT ISBLANK ( 'Properties'[Const-Y] ), 'Properties'[Const-Y] ) & "-",
    "Q" & 'Properties'[Const-Q]
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.