Mar 28 2020 04:14 AM
Buenas tardes, quiero armar una consulta uniendo dos tablas:
Tabla 1 (dos campos ID y Nro)
ID Nro
A 1
B 2
Tabla 2 (un campo PAIS)
PAIS
Ale
Ita
Fran
Quiero generar una union de ambas con este resultado:
ID Nro PAIS
A 1 Ale
B 2 Ale
A 1 Ita
B 2 Ita
A 1 Fra
B 2 Fra
Las tablas no tienen campos en comun. Es factible hacer este tipo de union con power query?, como se podria lograr?
Mar 28 2020 07:47 AM
HI @Exemilenio
can you pls attached your query in excel file and post it again
Regards, Faraz Shaikh | MCT, MIE, MOS Master, Excel Expert
If you find the above solution resolved your query don't forget mark as Official Answer.
Mar 28 2020 12:06 PM
With this sample
query could be
let
Source = Excel.CurrentWorkbook(){[Name="IDs"]}[Content],
Country = Excel.CurrentWorkbook(){[Name="Country"]}[Content],
AddListOfCountries = Table.AddColumn(
Source,
"Country",
each Country[Country]
),
ExpandCountries = Table.ExpandListColumn(
AddListOfCountries,
"Country"
),
SortByCountry = Table.Sort(
ExpandCountries,
{{"Country", Order.Ascending}}
)
in
SortByCountry