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
bilingual
Helper V
Helper V

Change data input from column to row - best practice, Excel, SQL or PowerBI?

Hi, my data is in SAP and currently designed by rows and i can not change this, but i need to change some parts of it into columns.

Here is an example:

Present structure

IDStopDate Time
P6544201-01-202110:50
P6544401-01-202111:55
P6544402-01-202111:35
P6585401-01-202109:45

 

Here is what i would like the structure to be changed into:

 

IDStop 1Date 1

Time 1

Stop 2Date 2

Time 2

Stop 3

Date 3

P6544201-01-202110:50401-01-202111:55402-01-2021
P6585401-01-202109:45     

 

So some tips regarding changing structure from column to row would be well recieved 🙂

 

And sorry about the messed up tables, i use the tabletool from PowerBI and it still gives me a html error...

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

v-lionel-msft
Community Support
Community Support

Hi @bilingual ,

 

Maybe you can refer to my .pbix file.

v-lionel-msft_0-1612424796835.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lionel-msft
Community Support
Community Support

Hi @bilingual ,

 

Maybe you can refer to my .pbix file.

v-lionel-msft_0-1612424796835.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@bilingual , first add an index column by ID -https://www.youtube.com/watch?v=7CqXdSEN2k4

 

then unpivot new index column and date

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

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.