Forum Discussion
Connect 2 columns in one
Hello!
I have 3 tables (in each column a city with different data). I need to create a new column that will include all cities from 3 tables.
For example, I have:
Table1 - Cities1
Table2 - Cities2,Country2
Table 3 - Cities3, Country3, Price
I want to have this table:
Table 4 - Column ,,Cities": Cities1 + Cities2 + Cities3
Hello karoli_naa
You can create that new table like so.
Cities = DISTINCT ( UNION ( DISTINCT ( Table1[Cities] ), DISTINCT ( Table2[Cities] ), DISTINCT ( Table3[Cities] ) ) )You would go to modeling > new table and paste in this code to get a table called 'Cities'
2 Replies
- jdbuchanan71Super User
Hello karoli_naa
You can create that new table like so.
Cities = DISTINCT ( UNION ( DISTINCT ( Table1[Cities] ), DISTINCT ( Table2[Cities] ), DISTINCT ( Table3[Cities] ) ) )You would go to modeling > new table and paste in this code to get a table called 'Cities'
- AnonymousNot applicable
Hi karoli_naa,
Can you give a sample of your data (with no sensible data) so we can see what can do.
Anyways you probably need to Append them all and concatenate but I don't know if your data is adaptable to this.
Best Regards,
Duarte Raminhos