Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I search on this forum but i did'nt found exaclty my answer.
I have to table that countains country datas loade from two differents datasource and could have differents fields. For example if i had two tables of countries, some countries could be in one but not in the auther. I want to have e result table with all countries found in this two tables.
Country A | |
Code | Name |
FR | France |
US | United States |
IT | Italy |
Country B | ||
Code | Name | Continent |
FR | France | Europe |
GB | United | Europe |
ES | Spain | Europe |
US | United States | America |
I want to replicate a SQL full join so as to merge this to table and get this results :
Merged Country | ||
Code | Name | Continent |
FR | France | Europe |
US | United States | Europe |
IT | Italy | |
GB | United | Europe |
ES | Spain | Europe |
Can anynone help me, that's very urgent...
This should be done in Power Query or SQL, in a word in the ETL layer, not in DAX. But here's the DAX if you really want to do it:
[Merged Table] = generateall( distinct( union( selectcolumns( 'Country A', "Code", 'Country A'[Code], "Name", 'Country A'[Name] ), selectcolumns( 'Country B', "Code", 'Country B'[Code], "Name", 'Country B'[Name] ) ) ), var __code = [Code] var __continent = max( filter( 'Country B', 'Country B'[Code] = __code ), 'Country B'[Continent] ) return row("Continent", __continent) )
Best
Darek
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |