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
mynameiserr
New Member

Convert data in rows to columns with attribute index

I need to convert data from a format where each row contains different data based on an attribute column into a proper table with the attribute column entries as new column headers.

 

Tried a few things without luck - like to have the done in query editor - any ideas?

 

accountIdATIDValue
1000004gp_dc_database_id5
1000004gp_dc_department_id26142
1000004gl_account5040
1000004gl_account_index26142-5040
1000004gp_customer_id00117
1000005gp_dc_database_id 
1000005gp_dc_department_id26142
1000005gl_account5040
1000005gl_account_index26142-5040
1000005gp_customer_id00009
1000006gp_dc_database_id5
1000006gp_dc_department_id26142
1000006gl_account5040
1000006gl_account_index26142-5040
1000006gp_customer_id00114
1000007gp_dc_database_id5
1000007gp_dc_department_id26142
1000007gl_account5040
1000007gl_account_index26142-5040
1000007gp_customer_id00017
1000008gp_dc_database_id5
1000008gp_dc_department_id26142
1000008gl_account5040
1000008gl_account_index26142-5040
1000008gp_customer_id00120

 

Desired

AccountIDgp_dc_database_idgp_dc_department_idgl_accountgl_account_indexgp_customer_id
1000004526142504026142-504000117
1000005 26142504026142-504000009
1000006526142504026142-504000114
1000007526142504026142-504000017
1000008526142504026142-504000120
1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@mynameiserr

 

You can pivot the ATID Column with following settings

 

pivot.png


Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@mynameiserr

 

You can pivot the ATID Column with following settings

 

pivot.png


Regards
Zubair

Please try my custom visuals

Yep, that worked -  I tried multiple times to pivot , concatenate etc etc - must be tired:)

 

Most appreciated!

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.