February 1, 2019
Hi Guys,
i have query like:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Key", Int64.Type}, {"Key2", Int64.Type}, {"Col2", type text}, {"Col3", type text}}),
#"Merged Queries" = Table.NestedJoin(#"Changed Type", {"Key", "Key2"}, Table13, {"Key", "Key2"}, "Table13", JoinKind.Inner),
#"Removed Columns" = Table.RemoveColumns(#"Merged Queries",{"Table13"}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"Key", "Key2"}, "Attribute", "Value"),
#"Removed Columns1" = Table.RemoveColumns(#"Unpivoted Columns",{"Attribute"})
in
#"Removed Columns1"
And now in step #"Merged Queries" i am merging table1 with Table13 using inner join.
Where is the issue that Key2 in Table13 can be removed and i will get error:
Expression.Error: The column 'Key2' of the table wasn't found.
Details:
Key2
What i want to do is add If statetement or try statement and if Key2 was removed just use inner join for "Key" field.
(use one column not 2 within inner join).
How can i do this?
Best,
Jacek
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Please stop creating new topics on the same problem. The answer to this question was already posted here:
https://www.myonlinetraininghu.....ion#p20677
All your other new topics you created are related to the same problem, please post your follow-ups on the same topic.
February 1, 2019
Hi i am going there. Sorry if i posted wrongly.
There is no solution for my question there.
There was entirely different topic with comparing 2 the same structured tables.
Here i am trying to get the list of all columns and if the column is not there, change Inner Join to catch it.
For example,
I want to get "Key" and "Key2" columns from table.
So i am checking first if TableCointains the columns and then selecting columns and using them in inner join.
Are you sure i should go there?
Best,
Jacek
1 Guest(s)