Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
10 |