cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jak82 Member
Member

Left(1) in power query

Hi,

 

I have a column with nominal codes ie

 

144722

 

Now if it begins with 1 I want to have a column which says Carlisle.

 

2 would be Egremont.

 

How would I go about doing column based on the first digit in another column in Power Query.

 

Thanks

 

Chris

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Left(1) in power query

@jak82

In the Query Editor, try adding this Custom Column

 

=if Text.Start(Text.From([ColumnName]),1)="1" then "Carlise" else "Egremont"
2 REPLIES 2
Super User
Super User

Re: Left(1) in power query

@jak82

In the Query Editor, try adding this Custom Column

 

=if Text.Start(Text.From([ColumnName]),1)="1" then "Carlise" else "Egremont"
jak82 Member
Member

Re: Left(1) in power query

Thanks Zubair