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
Anonymous
Not applicable

Noob needs help with shaping data

Hi all,

 

Noob here! I need advice on how to shape the following excel data structure for Power BI to make sense of. Please help?

 

Data Structure.png

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar problem at this link - Rearrange a multi heading dataset into a single heading one which is Pivot ready.

Hope this helps.


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

View solution in original post

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar problem at this link - Rearrange a multi heading dataset into a single heading one which is Pivot ready.

Hope this helps.


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

Awesome! Thank you so much!

You are welcome.


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

@Ashish_Mathur 

 

Hi Ashish! Sorry to trouble you.

 

I am not clever enough to apply your example to my problem. There is an additional header row that I cannot figure out to transform. Can you take a look at the sample data file attached and provide a step by step? I will be most grateful!

DumpFile_Extract.xlsx

 

Note: Category 2 starts from column BN.

 

Regards,

Yee Pin

Hi,

My method will not work on your dataset because there are 3 headings for every column - in rows 1,2 and 3.  The only way my method can be made to work on your data is if we combine the headings in rows 1 and 2.  This way we will be left with only 2 headings per column.  In the final output though, we will again break up the combined strings and show them in seperate columns.  If you are agreable to this minor change in your inout data, then i can solve this for you.  Also, what is the use of the columns from FV:GM?  Can they be deleted?


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

Hi Ashish! Thank you so much for responding!

 

Yes, let's try the approach that you have selected. 

 

I have checked and Columns FV:GM are actually the comments for the Category. So in the data set, there are Safe and Unsafe comments for:

- General

- Category e.g. reactions of people, positions of people, etc

- Subcategory e.g. reactions of people - Adjusting PPE, reactions of people - rearranging job, positions of people - falling, positions of people - strking against or being struck by objects, etc.

 

Can we keep them?

Hi,

I am no sure of whether this is correct or not but refer to sheet3 of this workbook.


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

I would shape it like this, to put the catagories as par of the data. 

I have colour coded, so it is easier to see where the original data would be put.Shape Data.PNG

 

Hope this will help.

Anonymous
Not applicable

Hi Thim,

 

Thank you so much! I am very grateful!

 

I am thinking that I will need to use "Unpivot" columns. Am I on the right track? 

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.