Forum Discussion
Anonymous
5 years agoNot 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
- bongmw
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]
) - AnonymousNot applicable
[Const Year-Quarter] = var Year_ = Properties[Const-Y] var Quarter_ = Properties[Const-Q] RETURN if( NOT ISBLANK( Year_ ), Year_ & "-Q" & Quarter_ )