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

How to handle NULL value in custom column

HI,

I need to to convert the below expression to power BI supported expression when I am going to add new column :

 

if(not isNULL(DOC_RECORD_KEY), DOC_RECORD_KEY,
if(not isNULL(MSG_RECORD_KEY), MSG_RECORD_KEY, GATEWAY_RECORD_KEY)
) as TRANSACTION_RECORD_KEY

 

Can anyone tell me the correct syntax for it?

4 REPLIES 4
Anonymous
Not applicable

Hi,

I am using the below code:

if ([DOC_RECORD_KEY] <> "NULL", [DOC_RECORD_KEY],
if([DOC_RECORD_KEY] <> "NULL", [DOC_RECORD_KEY], [GATEWAY_RECORD_KEY]
)
)

but getting 'Token RightParen Expected' error. So please correct me in this case.

Hi @Anonymous

 

You may refer to below DAX.  If it is not your case, please share your data sample and expected output.

Column =
IF (
    Table[DOC_RECORD_KEY] <> BLANK (),
    Table[DOC_RECORD_KEY],
    Table[GATEWAY_RECORD_KEY]
)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

I am using the below DAX expression:

TRANSACTION_RECORD_KEY = if([DOC_RECORD_KEY] <> BLANK(),[DOC_RECORD_KEY], if([MSG_RECORD_KEY] <> BLANK(), [MSG_RECORD_KEY], [GATEWAY_RECORD_KEY]))

 

but getting the below error:

 

Argument '3' in IF function is required.

 

Please correct the above syntax.

Hi @Anonymous

 

I've tested your DAX expression with my data. It seems nothing wrong with it. It's better you can share your data sample or show the error screenshot.

Column = IF([DOC_RECORD_KEY]<>BLANK(),[DOC_RECORD_KEY],IF([MSG_RECORD_KEY]<>BLANK(),[MSG_RECORD_KEY],[GATEWAY_RECORD_KEY]))

1.png

 

Regards,

Cherie

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.