Forum Discussion
Append column with another existing column DAX
Hi everyone,
I try to find a DAX function for this kind of append problem. As in the picture below, I have three rows with value for Attribute 1 and many values for Attribute 2. Now I want to add these 3 rows with value from Attribute 1 to the end of Attribute 2, then I have Attribute 3.
Anonymous ,
I'm afraid DAX can't achieve this requirement. I would suggest you use power query, copy the original table into Table(2) and Table(3), remove other columns and keep Attribute 1 in Table(2), remove other columns and keep Attribute 2 in Table(2), then rename both as Attribute 3 as below:
Then append the two tables above and add an index column in the appended table and original table like below:
Appended Table:
Original Table:
Then merge the two tables based on index column and remove the index column in the merged table:
You can also refer to the appendix.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- v-yuta-msft
Community Support
Anonymous ,
I'm afraid DAX can't achieve this requirement. I would suggest you use power query, copy the original table into Table(2) and Table(3), remove other columns and keep Attribute 1 in Table(2), remove other columns and keep Attribute 2 in Table(2), then rename both as Attribute 3 as below:
Then append the two tables above and add an index column in the appended table and original table like below:
Appended Table:
Original Table:
Then merge the two tables based on index column and remove the index column in the merged table:
You can also refer to the appendix.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicableThank you v-yuta-msft