Forum Discussion

karoli_naa's avatar
karoli_naa
Frequent Visitor
6 years ago
Solved

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 - Cities...
  • jdbuchanan71's avatar
    6 years ago

    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'