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

Reshaping Data from wide to Long

Hello. 

 

I am looking or help on best practices for reshaping data in Power BI without using R or Python. 

 

I have been given an HR file that contains the following information. Each instance (candidate +recruiter + job + location) has one row and all the events for that instance are columns like this: 

 

Person RecruiterPostionlocationEvent1Event2Event3Event4
1A1234BOSdate1date2date3date4
1C3567BOSdate5date6date7date8
2A1368COSdate9date10date11date12
3B632ATLdate13date14date15date16

 

I need to make all the event columns into two columns event type and date like the table below. Is this possible?

 

Person RecruiterPostionlocationEvent TypeDate
1A1234BOSEvent1date1
1A1234BOSEvent2date2
1A1234BOSEvent3date3
1A1234BOSEvent4date4
1C3567BOSEvent1date5
1C3567BOSEvent2date6
1C3567BOSEvent3date7
1C3567BOSEvent4date8
2A1368COSEvent1date9
2A1368COSEvent2date10
2A1368COSEvent3date11
2A1368COSEvent4date12
3B632ATLEvent1date13
3B632ATLEvent2date14
3B632ATLEvent3date15
3B632ATLEvent4date16
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try Unpivot

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This solution was incredibly useful, it helped me reduce some work I was doing from hours to minutes.
Thanks.

amitchandak
Super User
Super User

Try Unpivot

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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.