cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Left Outer Join/Left Four Characters

So I'm trying to re-create the following in Power BI:

 

SELECT
i.*,
d.[EmployeeID],
d.[LOB]
FROM [dbo].[tblImport] i
LEFT JOIN [dbo].[tblDepartments] d
ON LEFT(i.[Delegate], 4) = d.[EmployeeID]

 

First, I created a calculated column to get the left 4 characters of the Delegate field, and then the Relationships button to create the relationship.  I could not create a relationship because the values in the Delegate field are not unique.

 

Second, I went to the Query Editor to try to create the LEFT JOIN  there.  I attempted to add a calculated column to get the left 4 characters of the Delegate field.  I received an error.  Here is the code I attempted:

 

Left4 = LEFT('Main Data Source'[Delegate], 4)

 

What am I doing wrong?  Am I attempting something that Power BI was not built to do?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Left Outer Join/Left Four Characters

Hi @imani_tech,

In the query editor the language is not DAX is M so the formulas are different you need to yse the following formula:
Text.Start([Delegate], 4)

Be aware that in power query the formulas are case sensitive so you need yo put it with the caps in first letter of each word.

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog:

Power BI em Português





View solution in original post

1 REPLY 1
Highlighted
Super User III
Super User III

Re: Left Outer Join/Left Four Characters

Hi @imani_tech,

In the query editor the language is not DAX is M so the formulas are different you need to yse the following formula:
Text.Start([Delegate], 4)

Be aware that in power query the formulas are case sensitive so you need yo put it with the caps in first letter of each word.

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog:

Power BI em Português





View solution in original post

Helpful resources

Announcements
June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors