Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
WingsGSE
Regular Visitor

Group data (addresses) from two rows into one but with separate columns - going mad!

Hi!

 

I am using data imported from our SQL server - it's showing the Collection address (6 columns) and Delivery address (6 columns) in two separate tows, with the job ID as the common denominator. I need to group these into one row but separate columns (such that I can then rename them as Collection Address 1, 2, 3, Collection City, Delivery Address 1, 2, 3, Delivery City etc) on one row.

 

IdJobIdAddressTypeAddress1Address2Address3CityStatePostalCode
438721970123 Road123 Street123 Address 3City StateAB12 3CD
438821971456 Road456 Street456 Address 3City  StateEF45 6GH

 

I have been attempting this with the Group By function but I'm going wrong somewhere as it's mixing up the two addresses.

 

Can anyone kindly point me in the right direction?

 

Thanks!

1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@WingsGSE ,

This can be done in Power Query using the Merge Queries function.

I have attached a pbix file so you can easily see the steps to accomplish your ask.

Hope this is the result you are looking for.

Regards,

View solution in original post

3 REPLIES 3
rsbin
Super User
Super User

@WingsGSE ,

This can be done in Power Query using the Merge Queries function.

I have attached a pbix file so you can easily see the steps to accomplish your ask.

Hope this is the result you are looking for.

Regards,

I cannot thank you enough!

@WingsGSE ,

You just did.

Thx and Best Regards,

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.