Forum Discussion

jmckentr's avatar
jmckentr
Frequent Visitor
9 years ago
Solved

How to combine two column from two different table into one.

I need to merge two columns from two septerate tables into one new table without going into edit mode (dont have ability to - long story).

 

Example:

Sales FY 17ShipDateMethodYear
929191/20/2017Y2017
800922/23/2017T2017
998563/4/2017Y

207

 

Sales FY 16ShipDateTypeMonth
367721/20/2016AirJan
237682/23/2016PortFeb

 

SalesShipDate
929191/20/2017
800922/23/2017
998563/4/2017
367721/20/2016
237682/23/2016

 

Is there DAX funcationality or something else that can help me achieve this?

  • jmckentr

     

    You just need to summarize FY and ShipDate column for both tables and UNION() them together.

     

    Table = UNION(SUMMARIZE(FY17,FY17[Sales FY 17],FY17[ShipDate]),SUMMARIZE(FY16,FY16[Sales FY 16],FY16[ShipDate]))

     

     

    Regards,

2 Replies

  • You need to relate them in relationship view or in dax formula to proceed with this. If you already have them related, there is no need to write a dax creating a new table, you can just add a column to * table of relation with =RELATED('Table'[ColumnName]).

     

    Regards,

     

  • v-sihou-msft's avatar
    v-sihou-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    jmckentr

     

    You just need to summarize FY and ShipDate column for both tables and UNION() them together.

     

    Table = UNION(SUMMARIZE(FY17,FY17[Sales FY 17],FY17[ShipDate]),SUMMARIZE(FY16,FY16[Sales FY 16],FY16[ShipDate]))

     

     

    Regards,