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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
LaurentZ
Helper I
Helper I

AutoFill from the Left

Dear All,

Thank you for taking the time to read this.

 

In my Query I've this kind of Data

Type1   Type2   Type3     NEW COL
AA         BB                         BB
CC         DD         EE            EE

 

I would like to add a new column that does the follwing:

(if type3 ="" then (if type 2 ="" then type 1 else type 2) else type 3)

 

the reason is that I want to map and merge with another table 

Mapping Table
BB   BALI-BALO
EE    ELI-ELO

 

Is this possible ?

Regards,

Laurent

1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@LaurentZ 

 

Create a custom column in Edit queries as below

 

= if [Type3] = "" and [Type2] = ""  then [Type1] else if [Type3] = "" then [Type2] else [Type3]

 

 image.png

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

View solution in original post

3 REPLIES 3
VasTg
Memorable Member
Memorable Member

@LaurentZ 

 

Create a custom column in Edit queries as below

 

= if [Type3] = "" and [Type2] = ""  then [Type1] else if [Type3] = "" then [Type2] else [Type3]

 

 image.png

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

Thank you @VasTg . It works like a charm !

@LaurentZ 

 

Glad it helped.

 

Connect on Linkedin 

Connect on LinkedIn

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors