Forum Discussion

ldamato's avatar
ldamato
Frequent Visitor
4 years ago
Solved

Combine 2 tables into one matrix

Hi everyone.  I have 2 tables and both have the same columns. They are the same structure with different values:  My goal here is transform these 2 tables into one matrix like this below: ...
  • tamerj1's avatar
    4 years ago

    Hi ldamato 

    you can do the following in power query

    1. add a new column in table1:

    Table = "Table1"

    2. add a new column in table2:

    Table = "Table2"

    3. Append the two tables in one master table

    4. unpivot the 4 columns that have numeric values. That would create an Attribute column containing the names of the 4 columns and a Value column containing all numeric values. 

    5. In your matrix drag the column [Attribute] from the master table into the rows and drag the column [Table] into the columns. 
    6. create two measures: 

    MAX ( 'Master Table'[Value] )

    and

    MIN ( 'Master Table'[Value] )

    7. place both measures in values of the matrix.