Forum Discussion

JoshHall's avatar
JoshHall
New Member
5 years ago
Solved

Appending columns

I have a set of data that looks like this example (although th real one has >600 "log work" columns, each of which has a name, date and time which I intend to extract after I figure this part out)

I need to be able to compare each "log work" entry with others from the same assignee, and my thoughts were to append the columns onto each other in a new table somehow like so (this is just imported from a manually created excel sheet):

I managed to get several of the columns appended to each other in a new table using DAX but that required manually typing out each column name, and in the real data set I have over 600 (which could change to be more or less depending on the database users) so I'm not really sure if typing out a few thousand lines of code just to create a table that just won't take in data from the database after a certain number of columns is worth it. If anyone has an idea of how I could go about either looping my dax code through multiple columns based on their names, or if anyone just has an alternative way of comparing the things I need to that would be really helpful.

  • Hi, JoshHall 

    According to your description, I think you can get the expected data through the Power Query editor, you can follow my steps:

    1. Go to the Power query editor, select the column [Assignee], click Unpiovit-> Unpiovit other columns:

     

    1. Remove the second column:

     

    And you can get what you want, like this:

    You can download my test pbix file here

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies