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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Tob_P
Helper V
Helper V

Replace values in one column based on 3 criteria

Hi,

 

Complete novice when it comes to Custom Columns in Query Editor.

 

I have two columns, Primary email and Secondary email. I have a few condtions that I need met for my new column.

 

  1. If Primary email is blank, return the value in Secondary email, only if Secondary email contains '@emailaddress'
  2. If Primary email contains '@snailmailaddress', replace with value in Secondary email, provided it contains '@emailaddress'
  3. If Primary email is blank, and so is secondary, then return blank

Any guidance on this would be appreciated.

2 REPLIES 2
Tob_P
Helper V
Helper V

@serpiva64 

I've tried to post it as a table but MS think that I'm trying to spam as there's email addresses included so won't let me post it, so I'm afraid a screenshot will have to do..

 

Tob_P_0-1675960519533.png

 

serpiva64
Solution Sage
Solution Sage

Hi,

please post some sample data and your expected result

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors