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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.