• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Merging 2 columns into 1 based on text and data from one row |Power Query|Excel Forum|My Online Training Hub

You are here: Home / Merging 2 columns into 1 based on text and data from one row |Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryMerging 2 columns into 1 based on t…
sp_PrintTopic sp_TopicIcon
Merging 2 columns into 1 based on text and data from one row
Avatar
jaryszek
Member
Members
Level 0
Forum Posts: 183
Member Since:
February 1, 2019
sp_UserOfflineSmall Offline
1
February 1, 2019 - 9:03 pm
sp_Permalink sp_Print sp_EditHistory

Hi Guys,

i have 2 tables:

1.t_source
2. t_tiers

and i want to achieve the result like in screen and excel attached.

So as you can see i have to merge 2 columns into one (ABY Server Type & BRO ServerType AND ABY Number & BRO number), add specific tier group to topology as column and finally get result like in screen above.

How can i do this? 

Please help,
thank you in advance
JacekScreenshot_1.pngImage Enlarger

Screenshot_2.pngImage Enlarger
Screenshot_3.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot_1.png (332 KB)
  • sp_PlupImage Screenshot_2.png (18 KB)
  • sp_PlupImage Screenshot_3.png (415 KB)
sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
February 1, 2019 - 9:46 pm
sp_Permalink sp_Print

Hi Jacek,

Welcome to the forum. Thanks for sharing a sample file.

Please see attached. Note: since there is no common column between the two tables I've matched the Tier Group so that it alternates between ABY and BRO as there is no other logic I could see.

Mynda

Avatar
jaryszek
Member
Members
Level 0
Forum Posts: 183
Member Since:
February 1, 2019
sp_UserOfflineSmall Offline
3
February 1, 2019 - 10:08 pm
sp_Permalink sp_Print sp_EditHistory

Wow thank you Mynda ! 

i understand your steps, awesome! 
Have a question regarding using index and refering this to tier group. 

It can be also done by text? 
I mean in tier group i have only 2 items, but if i will have more (for example 4) i think the index function will not work. 

Best,
Jacek 

Avatar
jaryszek
Member
Members
Level 0
Forum Posts: 183
Member Since:
February 1, 2019
sp_UserOfflineSmall Offline
4
February 1, 2019 - 10:15 pm
sp_Permalink sp_Print sp_EditHistory

Screenshot_1-1.pngImage Enlarger

Screenshot_2-1.pngImage Enlarger
Ok,

i know where is mistake. 

Sorry, for source table i should provide something like in attachment.

Maybe now i can somehow refer to table with tier group?Screenshot_6.pngImage Enlarger

I mean to use Topology as joined field, can you help with this?

I added new Excel example.

Best,
Jacek

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot_6.png (213 KB)
  • sp_PlupImage Screenshot_1-1.png (215 KB)
  • sp_PlupImage Screenshot_2-1.png (212 KB)
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
5
February 3, 2019 - 12:28 pm
sp_Permalink sp_Print

Hi Jacek,

I can't open the revised file. Can you please upload one with a different name to the original.

Mynda

Avatar
jaryszek
Member
Members
Level 0
Forum Posts: 183
Member Since:
February 1, 2019
sp_UserOfflineSmall Offline
6
February 3, 2019 - 8:11 pm
sp_Permalink sp_Print

Hi Mynda,

thank you. 

I attached the file. 

btw. this forum is awesome!

Best,
Jacek 

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
7
February 4, 2019 - 12:16 pm
sp_Permalink sp_Print

Hi Jacek,

Great to know you're finding the forum helpful. Please find attached. Note: these techniques are all covered in my Power Query course. 

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
jaryszek
Member
Members
Level 0
Forum Posts: 183
Member Since:
February 1, 2019
sp_UserOfflineSmall Offline
8
February 4, 2019 - 5:50 pm
sp_Permalink sp_Print

Thank you Mynda,

awesome! 

If i would get founds from my Employer i will buy this course, 
All is working! 

Great knowledge!

Thank you,
Jacek 

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Mia Nielsen, Jeff Krueger, Shanna Henseler, Lawrence Smith
Guest(s) 11
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31889
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.