Forum Discussion
row data as column
Hi,
For a transport analysis i want to know the all the activities/stops from the whole ride.
Every ride has an unique ride header number and all the activities have also unique activity number.
The activities are vertical stored in the table, i want them horinzontally to show and measure the time diffrence between them.
Can some one help me with this?
Thanks in advance.
Hi souhail98 ,
Please refer to my .pbix file.
Note: The first thing you need to do is to pivot the table(refer to the step in Power Query).
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- amitchandakSuper User
souhail98 ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.- souhail98Frequent Visitor
Hi Amit,
Thanks for your reply.
The table below is my datasource, every row is an activity within the Transport ride.
Ride header activity id activity name Time zip code, etc 313790 180978 start 06:00 4844 313790 180979 Load 06:15 4844 313790 180980 unload 13:15 5001 313790 180981 end 17:00 4844 I want to make a table visual with calcultated (duration) columns, something like this below:
Ride header Start load Duration load time Zipcode unload Duration
Drive and unload time
Zipcode end Duration drive back time Total time 313790 06:00 06:15 15 min 4844 13:15 7 hours 5001 17:00 3:45 11 hours I hope it is understandable. i dont know how to convert the vertical data to horizontal in a
chronological flow (start, load, unload, end ).
Thanks in advance.
- v-lionel-msftCommunity Support
Hi souhail98 ,
Please refer to my .pbix file.
Note: The first thing you need to do is to pivot the table(refer to the step in Power Query).
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- souhail98Frequent Visitor
Hi Amit,
Thanks for your reply.
The table below is my datasource, every row is an activity within the Transport ride.
Ride header activity id activity name Time zip code, etc 313790 180978 start 06:00 4844 313790 180979 Load 06:15 4844 313790 180980 unload 13:15 5001 313790 180981 end 17:00 4844 I want to make a table visual with calcultated (duration) columns, something like this below:
Ride header Start load Duration load time Zipcode unload Duration
Drive and unload time
Zipcode end Duration drive back time Total time 313790 06:00 06:15 15 min 4844 13:15 7 hours 5001 17:00 3:45 11 hours I hope it is understandable. i dont know how to convert the vertical data to horizontal in a
chronological flow (start, load, unload, end ).
Thanks in advance.