Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JoshHall
New Member

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)

JoshHall_0-1608030567744.png

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):

JoshHall_1-1608030699400.png

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.

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

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:

v-robertq-msft_0-1608190092316.png

 

  1. Remove the second column:

v-robertq-msft_1-1608190092321.png

 

And you can get what you want, like this:

屏幕截图 2020-12-17 152829.png

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.

View solution in original post

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

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:

v-robertq-msft_0-1608190092316.png

 

  1. Remove the second column:

v-robertq-msft_1-1608190092321.png

 

And you can get what you want, like this:

屏幕截图 2020-12-17 152829.png

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.

HotChilli
Super User
Super User

Use Power Query. select the 1st column. Unpivot other columns

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.