Forum Discussion
jmckentr
9 years agoFrequent Visitor
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 17 | ShipDate | Method | Year |
| 92919 | 1/20/2017 | Y | 2017 |
| 80092 | 2/23/2017 | T | 2017 |
| 99856 | 3/4/2017 | Y | 207 |
| Sales FY 16 | ShipDate | Type | Month |
| 36772 | 1/20/2016 | Air | Jan |
| 23768 | 2/23/2016 | Port | Feb |
| Sales | ShipDate |
| 92919 | 1/20/2017 |
| 80092 | 2/23/2017 |
| 99856 | 3/4/2017 |
| 36772 | 1/20/2016 |
| 23768 | 2/23/2016 |
Is there DAX funcationality or something else that can help me achieve this?
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
- ibarrau
Super User
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
Microsoft Employee
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,