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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Raaassotto
Helper I
Helper I

Multiple text substitution with a Table.NestedJoin

I'm trying to substitute multiple text values with a table that contains substitutes.

On the merging step I got an error: 

Raaassotto_0-1611153582272.png

What's wrong with the query ?

The query is following:

 

let
tabletojoin=Table.FromRecords({
[ID = 1, Name = "cічень"],
[ID = 2, Name = "лютий"],
[ID = 3, Name = "березень"],
[ID = 4, Name = "квітень"],
[ID = 5, Name = "травень"],
[ID = 6, Name = "червень"],
[ID = 7, Name = "липень"],
[ID = 8, Name = "серпень"],
[ID = 9, Name = "вересень"],
[ID = 10, Name = "жовтень"],
[ID = 11, Name = "листопад"]
}),
Source = Excel.Workbook(File.Contents("C:\Users\a.ivanov\AppData\Local\Packages\Microsoft.MicrosoftPowerBIDesktop_8wekyb3d8bbwe\AC\INetCache\W0A9STZG\Exchange_r[1].xls"), null, true),
#"1" = Source{[Name="2020"]}[Data],
#"Removed Columns" = Table.RemoveColumns(#"1",{"Column14"}),
#"Removed Top Rows" = Table.Skip(#"Removed Columns",3),
#"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows", [PromoteAllScalars=true]),
#"Filtered Rows" = Table.SelectRows(#"Promoted Headers", each ([Column1] = "1 Долар США ")),
#"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"Column1", "Валюта"}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Renamed Columns", {"Валюта"}, "Attribute", "Value"),
#"Sorted Rows" = Table.Sort(#"Unpivoted Columns",{{"Attribute", Order.Ascending}}),
jointable=Table.NestedJoin(#"Sorted Rows", {"Attribute"}, tabletojoin, {"Name"}, JoinKind.LeftOuter),
#"Expanded tabletojoin1" = Table.ExpandTableColumn(jointable, "tabletojoin", {"Id"}, {"tabletojoin.Id"})
in
#"Expanded tabletojoin1"

1 ACCEPTED SOLUTION
artemus
Microsoft Employee
Microsoft Employee

You are missing the column name that contains the nested join in your parameter list. It goes just before the join kind.

View solution in original post

2 REPLIES 2
artemus
Microsoft Employee
Microsoft Employee

You are missing the column name that contains the nested join in your parameter list. It goes just before the join kind.

jointable=Table.NestedJoin(#"Sorted Rows", {"Attribute"}, tabletojoin, {"Name"},"newcolumnname",JoinKind.LeftOuter),

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors
Top Kudoed Authors