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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

how to add trimming and lowering directly in a nestedjoin method ?

Hello,

I have a step like this :

= Table.NestedJoin(REQ1, {"EMail"}, REQ2, {"Email"}, "REQ2", JoinKind.Inner)

I would like to optimize the result by trimming and lowering both columns EMail of REQ1 and Email of REQ2.

Is there a way I can add my Text.Trim(Text.Lower()) directly in this step or do I have to do it absolutely at an earlier step ?

Thanks for your help,

 

3 REPLIES 3
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

Replace the code below with the provided code.

let
  _REQ1 = 
     Table.TransformColumns( REQ1, { { "EMail", each Text.Trim( Text.Lowering(_) ) } } ),
  _REQ2 =
     Table.TransformColumns( REQ2, { { "Email", each Text.Trim( Text.Lowering(_) ) } } )
in 
  Table.NestedJoin(_REQ1, {"EMail"}, _REQ2, {"Email"}, "REQ2", JoinKind.Inner)

 

Regards

KT 

Anonymous
Not applicable

Hello, thank you but this adds a step. And this is what I wanted to avoid. Unless I can do like the following ?

= Table.NestedJoin(Table.TransformColumns( REQ1, { { "EMail", each Text.Trim( Text.Lowering(_) ) } } ), {"EMail"}, Table.TransformColumns( REQ1, { { "Email", each Text.Trim( Text.Lowering(_) ) } } ), {"Email"}, "REQ2", JoinKind.Inner)

Ideally, I would like something like this :

= Table.NestedJoin(REQ1, Text.Trim(Text.Lower({"EMail"})), REQ2, Text.Trim(Text.Lower({"Email"}), "REQ2", JoinKind.Inner)

Is is possible ?

Hi @Anonymous ,

 

Table.NestedJoin(
        Table.TransformColumns( REQ1, { { "EMail", each Text.Trim( Text.Lowering(_) ) } } ), 
        {"EMail"}, 
        Table.TransformColumns( REQ2, { { "Email", each Text.Trim( Text.Lowering(_) ) } } ), 
        {"Email"}, 
        "REQ2", 
        JoinKind.Inner
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors