Forum Discussion
jmhoskinson
7 years agoHelper I
Append in DAX
I want to create a table appending the ID and Type columns of two separate data sources. I want to include all records of each ID, not just distinct ones. I'm trying to avoid Power Query since the da...
- 7 years ago
That should be a JOIN operation rather than an append, either on SQL or DAX. Check this out:
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data and run a quick test, plus it increases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here.
Anonymous
3 years agoNot applicable
You could use a combination of UNION and SELECTCOLUMNS creating a calculated table which I did to solve a similar situation.
'calculated table name' = UNION(
SELECTCOLUMNS('Table 1',"ID", [Id],"Type",[Type],"Activity Date",[Activity Date],"Team",[Team],"Product",null),
SELECTCOLUMNS('Table 2',"ID", [Id],"Type",[Type],"Activity Date",[Activity Date],"Team",null,"Product",[Product])
)
Hope this helps
SELECTCOLUMNS('Table 1',"ID", [Id],"Type",[Type],"Activity Date",[Activity Date],"Team",[Team],"Product",null),
SELECTCOLUMNS('Table 2',"ID", [Id],"Type",[Type],"Activity Date",[Activity Date],"Team",null,"Product",[Product])
)
Hope this helps