Reply
Frequent Visitor
Posts: 10
Registered: ‎08-23-2016
Accepted Solution

creating table from multiple other tables

I have a report with multiple data tables. Four of them have a column that is named agency with similar data. I want to take the distinct values from all four tables and create a new table with a single agency column that has distinct values from the other four tables. Basically I want to do what union does with more then two tables. Can someone explain how I do this?


Accepted Solutions
Established Member
Posts: 175
Registered: ‎08-06-2015

Re: creating table from multiple other tables

Hi, welcome to the community, try this: Go to the modelling tab on the ribbon and click create new table. In the formula bar use the DAX expression

=
SUMMARIZE (
    UNION (
        ALL ( Table1[UniqueValue] ),
        ALL ( Table2[UniqueValue] ),
        ALL ( Table3[UniqueValue] ),
        ALL ( Table4[UniqueValue] )
    ),
    [UniqueValue]
)

 

 

 

//If this solves your question please mark as such

View solution in original post


All Replies
Established Member
Posts: 175
Registered: ‎08-06-2015

Re: creating table from multiple other tables

Hi, welcome to the community, try this: Go to the modelling tab on the ribbon and click create new table. In the formula bar use the DAX expression

=
SUMMARIZE (
    UNION (
        ALL ( Table1[UniqueValue] ),
        ALL ( Table2[UniqueValue] ),
        ALL ( Table3[UniqueValue] ),
        ALL ( Table4[UniqueValue] )
    ),
    [UniqueValue]
)

 

 

 

//If this solves your question please mark as such

Highlighted
Frequent Visitor
Posts: 10
Registered: ‎08-23-2016

Re: creating table from multiple other tables

Thanks Bud!!!!

Member
Posts: 62
Registered: ‎06-15-2017

Re: creating table from multiple other tables

=
SUMMARIZE (
    UNION (
        ALL ( Table1[UniqueValue] ),
        ALL ( Table2[UniqueValue] ),
        ALL ( Table3[UniqueValue] ),
        ALL ( Table4[UniqueValue] )
    ),
    [UniqueValue]
)

 

 

What is this unique value line at the end supposed to be?