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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
davidmeblack
Regular Visitor

Unstructured data transform question

Hi guys,

A piece of software I use exports its .csv files in a very... bad way. See below

 

NameDescriptionAValueADescriptionBValueBDescriptionCValueC
Car1Door2Window4Trunk6
Car2Door5Window8Trunk1

 

I want to transform it from that to this:

 

NameDescriptionValue
Car1Door2
Car1Window4
Car1Trunk6
Car2Door5
Car2Window8
Car2Trunk1

 

So basically grouping all descriptions and values. I've tried every combination of pivot/unpivoting/transpose but I can't get the correct result! There's currently ~180 columns of that description/value format it spits out so if anyone has any tips it would be greatly appreciated!

 

Thanks,
Dave

2 ACCEPTED SOLUTIONS
Zubair_Muhammad
Community Champion
Community Champion

Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my Blog article - Restructure the layout of datasets.  Refer to Case 1.

 

Hope this heps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
davidmeblack
Regular Visitor

Perfect thanks so much guys, really appreciate it!

Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my Blog article - Restructure the layout of datasets.  Refer to Case 1.

 

Hope this heps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Zubair_Muhammad
Community Champion
Community Champion

Hi @davidmeblack

 

See the attached file here. Hope it will help... See the Merged Table in Query Editor

@davidmeblack

 

Here are the steps

 

1) Unpivot all columns other than Car

2) Filter Rows that CONTAIN word "Description"

3) Add an Index Column

 

 

Now Create a Duplicate Query

1) Filter rows that CONTAIN word "Value"....

 

Now we can merge these 2 Queries

 

 

 

 

 

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.