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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.