Forum Discussion
How do I append two sources in DAX code instead of the append button?
Please try this
RenameColumns = Table.RenameColumns(#"Converted to Table2", {{"revenueamount", "conversionamount"}}),
CombineTables = Table.Combine({#"Converted to Table", RenameColumns}),Hi, this didnt work, do you have to expand first or something?
It says column not found but I know column exsists in the source 2, it gives me the error in the rename columns part.
Can you rewrite this?
let
Source1 = Json.Document(Web.Contents("https:/--Source1urlhere--account_name&_renderer=powerbi")),
Source2 = Json.Document(Web.Contents("https:/---Source2urlhere--account_name&_renderer=powerbi")),
#"Converted to Table1" = Table.FromRecords({Source1}),
#"Converted to Table2" = Table.FromRecords({Source2}),
#"RenameColumns" = Table.RenameColumns(#"Converted to Table2", {{"account_name", "account_name"}}), GIVES ME AN ERROR HERE
#"CombineTables" = Table.Combine({#"Converted to Table1", #"RenameColumns"})
in
#"CombineTables"
- v-jingzhang3 years agoCommunity Support
The first name should be the old column name existing in the second table to be changed, and the latter name is the new name for it. If it says column not found, it means that it cannot find the first name from #"Converted to Table2".
- shahid_tanmoy3 years agoHelper I
I know but the column does exsist in converted to table 2 cause if I expand it, its there. And i just changed it from account name to account name for testing purposes. can you write out the whole code from the beginning to see if it works, cause i tried it again with another table where i changed device_name to account_name and even though the json table has device_name, this piece of code cannot find it.