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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PhoenixBird66
Helper III
Helper III

DAX help - Custom column should be null if a value in another column is null

I have created a custom column (StdSvcKey) which is concatentation of two other columns (Sell-to Customer No. & Standard Service Code).

 

Currently if the Standard Service Code has a null value, but the Sell-to Customer No. field is not blank, my new custom column shows the contents of the Sell-to Customer No. field.  I need it to show as null if there is nothing in the Standard Service Code.

 

This is what I need it to look like:

2.JPG

 

 

 

But currently I'm getting this:

 

1.JPG

1 ACCEPTED SOLUTION

Hi @PhoenixBird66 

 

The below will handle nulls and ""

 

Column = 
IF( 
    NOT( ISBLANK( 'Table'[Standard Service Code] ) || 'Table'[Standard Service Code] = "" ),
    'Table'[Sell-to Customer No.] & 'Table'[Standard Service Code]
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski



View solution in original post

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @PhoenixBird66 

 

Try 

Measure = IF( NOT ISBLANK( YourTable[Standard Service Code] ), Concatenate expression )
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

No sadly that didnt work. It still returns the value from the Sell-to Customer No. field. I want it to be null if the Standard Service Code field is null.

 

This is the DAX i used:

 

Measure = IF( NOT ISBLANK( Query1[Standard Service Code] ), Query1[Sell-to Customer No.]&Query1[Standard Service Code])

Hi @PhoenixBird66 

 

The below will handle nulls and ""

 

Column = 
IF( 
    NOT( ISBLANK( 'Table'[Standard Service Code] ) || 'Table'[Standard Service Code] = "" ),
    'Table'[Sell-to Customer No.] & 'Table'[Standard Service Code]
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski



Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors
Top Kudoed Authors