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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Super User
Super User

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.