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

Hi @davidmeblack

 

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


Regards
Zubair

Please try my custom visuals

View solution in original post

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


Regards
Zubair

Please try my custom visuals

@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

 

 

 

 

 

 

 

 


Regards
Zubair

Please try my custom visuals

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.