• 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

Create table that only shows differences between 2 tables|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Create table that only shows differences between 2 tables|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 QueryCreate table that only shows differ…
sp_PrintTopic sp_TopicIcon
Create table that only shows differences between 2 tables
Avatar
Heleen de Waal

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
1
December 5, 2020 - 8:48 am
sp_Permalink sp_Print

Goodday all from the Netherlands,

 

I'm a newbie in Power Query and M but getting a better understanding every time I read posts in this forum and website (thank you for that)

Would you be so kind and have a look at my tables in attached sheet.

For testing purposes I've created dummy data and all tables in 1 sheet.

Goal is to use Power Query to create:

  4 tables as the result of comparisons of 2 tables

  1    Old table shows ID 1003, but New table does not > 1003 should show in table Removed

  2    New table shows ID 1006, but Old table does not > 1006 should show in table Added

  3    If an ID shows in both table (Old & New) > ID should show in table Identical

  4    For each ID in table Identical check if all the values in that row are the same as the values for that ID in Old Table

 

I've managed tables 1 to 3 and somewhat created table 4 but this last table is not completely as I would like it to be.

Can you help me to create table 4 (Adjusted) with Power Query and:

- avoid hardcoded columnnames as production tables contain approx 80 columns (to many to handle properly)

 

a bonus would be if the actually changed values get highlighted for the user.

(otherwise use Conditional Formatting or VBA?)

 

Please have a look at my file and teach me how I should handle this.

Thank you for your time.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1807
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
December 6, 2020 - 4:59 pm
sp_Permalink sp_Print sp_EditHistory

Hi Heleen,

What you should have in mind is that each row in a table is a Record.

If you add a new column, you can combine the current Record (row).

Other things you need to know:

each is the same with: (x)=> (where x is the record, the entire row data)

To combine a record, we convert to List: Record.ToList(x).

To combine all List items, we pass the list to Text.Combine, but before combining, we need to convert to text using List.Transform:
(x)=>Text.Combine(List.Transform(Record.ToList(x),each Text.From(_))," - ")

I adjusted a few queries for you, should be flexible now.

Avatar
Heleen de Waal

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
3
December 7, 2020 - 7:24 am
sp_Permalink sp_Print

Hi Catalin,

Thank you so much for your help.

It took me some time to figure out what you meant with the X being the entire row data. With your adjusted queries in the file I managed to figure it out.

Without your help I would never have thought of Record.ToList.

Grateful for you guidance.

Thanks again.

Regards,

Heleen

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Richard Mander, Peter Hoffman
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
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:
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Annie Witbrod
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
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.