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

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

Reply
Anonymous
Not applicable

Multiple Conditions in Custom Column

Hello, I was hoping someone could point out what I am doing wrong. 

I am using Power Query to check two columns for conditions and if they relsove to be true then update a third column. What I have so far is below

 

= Table.AddColumn(#"Replaced Value34", "Custom", each if [HDX_Domain] = "CPR" and [label] ="None" then "$CPR"
else if [HDX_Domain] = "CPR" and [label] is null then "$$$CPR"
else [label])

 

The first part works when it finds "None" in the [label] column, however I cannot seem to get Power Query to recognize the null in my column.

 

Thanks

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Try this, I think you just need to change to the [label] = null

 

Table.AddColumn(#"Changed Type", "Custom", each if [HDX_Domain] = "CPR" and [label] = "None" then "$CPR" else if [HDX_Domain] = "CPR" and [label] = null then "$$$CPR" else [label])

PowerQueryNull.jpg

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Try this, I think you just need to change to the [label] = null

 

Table.AddColumn(#"Changed Type", "Custom", each if [HDX_Domain] = "CPR" and [label] = "None" then "$CPR" else if [HDX_Domain] = "CPR" and [label] = null then "$$$CPR" else [label])

PowerQueryNull.jpg

Anonymous
Not applicable

Thank you. I will give this a try.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.