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

Re-arranging & unpivotting columns (simple task, but need help please)

hi all,

 

i have data in the following format, but i need to re-arrange it somehow in order to analyze it. I think it should be done using the unpivot function, but after some tries i still havent figured out how to do it.

 

cap1.PNGcap2.PNG

The top table shows how data looks now, but to analyze i think i need it the way table 2 is shown.

 

I have monthly data only, so maybe i need to make a separate calendar table with months or something, im really not sure how to best reformat the top table to make it "analyzable".

 

This is of course just an example, the real file has a lot more data, but the methodology should be the same.

 

How can table 2 be achived using Power BI? please specify how i should do it.. would really appreciate help!

 

also as a bonus i would like to know the difference between editing the tables using "edit queries" vs just editing the tables as they are using "modelling" anyone can explain the difference?

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my file from here.

 

Hope this helps.

 

Untitled.png


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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my file from here.

 

Hope this helps.

 

Untitled.png


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

I tried to replicate your steps, but i cant get the same result. Here is my process:

 

 

cap3.PNGcap4.PNGcap5.PNG

Hi,

 

When you split column, select "At the left most occurence"


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

cap6.PNG

 

 

what is your last step with the pivot column? i tried to pivot each of the columns one at a time without the right result.

Anonymous
Not applicable

 

Figured it out.

 

I hold ctrl and select both attribute and value and click pivot columns then ok and its complete.

Hi,

 

If my reply helped, please mark it as Answer.


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

yes thank you. it helped a lot but it was not entirely sufficient, but it got my started, so i could figure out the rest. thank you. will mark as answer.

You are welcome.


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

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.