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
Dr0idy
Helper I
Helper I

Transform 999+ column data into something sensible

I have an excel file (not created by me) that contains 999+ Columns in the repeating format as below.

AreaIndicator1 Year1Indicator1 Year2Indicator1 Year3Indicator2 Year1Indicator2Year2Indicator2 Year3

 

I want the data in the format

AreaIndicatorYearValue

 

I know how to do this manually with concatenations, delimiting and then splitting the columns. Is there a more automated way of me transforming this within Query Editor?

 

If anyone wants to see the actual data it is in the spreadsheet at http://www.improvementservice.org.uk/documents/benchmarking/1718rawdata.xlsx

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

hi @Dr0idy 

You could try this way as below:

Step1:

Selected all the columns except Area column, then unpivot these columns.

Step2:

Then split Attribute column to Indicator column and Year column.

Step3:

Now rename the column.

Result:

5.JPG6.JPG

 

and here is sample pbix file, please try it.

 

 

Community Support Team _ Lin
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

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi @Dr0idy 

You could try this way as below:

Step1:

Selected all the columns except Area column, then unpivot these columns.

Step2:

Then split Attribute column to Indicator column and Year column.

Step3:

Now rename the column.

Result:

5.JPG6.JPG

 

and here is sample pbix file, please try it.

 

 

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

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.