Forum Discussion
Anonymous
7 years agoNot applicable
use different data sources (PBIX file, SQL, ACCESS, Exccel)
Hi gurus,
Recently, I came across a PBIX file from a coworker which mixed and combined tables from different source in POWER Query PBI using let... in. I share the code as following:
Source = Excel.Workbook(File.Contents("C:\..\recordheights.xlsx"), null, true),
Contestant_Table = Source{[Item="Contestant",Kind="Table"]}[Data],
Custom1 = Source{[Item="Contestant",Kind="Table"]}[Data],
Custom2 = Source{[Item="Contestant",Kind="Table"]}[Data],
...
...
...
in
SLM_Total columnI am sure it is not by using get data. How we can use merge query for it here?
Thanks
3 Replies
- AnonymousNot applicable
Hi Anonymous ,
I guess you want to merge different tables who stored in same datasource, right?
If this is a case, you can refer to following sample code to merge these tables:Source = Excel.Workbook(File.Contents("C:\..\recordheights.xlsx"), null, true), Contestant_Table = Source{[Item="Contestant",Kind="Table"]}[Data], Custom1 = Source{[Item="Contestant1",Kind="Table"]}[Data], Custom2 = Source{[Item="Contestant2",Kind="Table"]}[Data], Merge = Table.Combine({Contestant_Table,Custom1,Custom2}) in MergeRegards,
Xiaoxin Sheng
- AnonymousNot applicable
AnonymousWho said this is a solution!!! it is not definitely a solution to my questions!
- AnonymousNot applicable
I used it but it triggers an error! Do you know why?