• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Merge Changes Value; Why?|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Merge Changes Value; Why?|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
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 QueryMerge Changes Value; Why?
sp_PrintTopic sp_TopicIcon
Merge Changes Value; Why?
Avatar
ExcelNovice2020
Member
Members
Level 0
Forum Posts: 62
Member Since:
February 8, 2020
sp_UserOfflineSmall Offline
1
March 17, 2020 - 11:21 am
sp_Permalink sp_Print

Please see attached file, in particular, Bud Men Roster Query.  Starting from top, everything is fine until the expansion of the "ADP with Drafted."  I have no idea why, but it's changing the "Distinct Pos" of Carlos Santana and Paul DeJong after the expansion.  Santana goes from C/IF1 to C/IF2 and DeJong goes from C/IF2 to C/IF1.  What's causing them to change?  The same occurs with SP Zach Wheeler and SP James Paxton.  Wheeler goes from SP2 to SP3 and Paxton goes from SP3 to SP2.  I've redone this several times, multiple hours.  I cannot figure out what's causing this.  The merged numbers match up perfectly.  Any suggestions?  It's driving me nuts.    

 

let
Source = Draft_Results_Reference,
#"Filtered Rows" = Table.SelectRows(Source, each ([Team] = "Bud Men") and ([Player] <> null)),
#"Merged Queries1" = Table.NestedJoin(#"Filtered Rows", {"NFBCID"}, #"ADP with Drafted", {"ID"}, "ADP", JoinKind.LeftOuter),
#"Expanded ADP with Drafted" = Table.ExpandTableColumn(#"Merged Queries1", "ADP", {"C", "1B", "2B", "3B", "SS", "OF", "RP", "SP"}, {"C", "1B", "2B", "3B", "SS", "OF", "RP", "SP"}),
#"Merged Queries" = Table.NestedJoin(#"Expanded ADP with Drafted", {"Distinct Pos"}, Positions, {"Distinct Pos"}, "Positions", JoinKind.RightOuter),
#"Expanded Positions" = Table.ExpandTableColumn(#"Merged Queries", "Positions", {"Pos", "Distinct Pos", "Order"}, {"Pos.1", "Distinct Pos.1", "Order"}),
#"Removed Other Columns" = Table.SelectColumns(#"Expanded Positions",{"Rd", "Pick", "Player", "$", "FAAB", "C", "1B", "2B", "3B", "SS", "OF", "RP", "SP", "Pos.1", "Order"}),
#"Reordered Columns" = Table.ReorderColumns(#"Removed Other Columns",{"Order", "Pos.1", "Player", "Rd", "Pick", "$", "FAAB", "C", "1B", "2B", "3B", "SS", "OF", "SP", "RP"}),
#"Renamed Columns" = Table.RenameColumns(#"Reordered Columns",{{"Pos.1", "Pos"}}),
#"Replaced Value" = Table.ReplaceValue(#"Renamed Columns","",null,Replacer.ReplaceValue,{"C", "1B", "2B", "3B", "SS", "OF", "SP", "RP"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"C", type any}, {"1B", type any}, {"2B", type any}, {"3B", type any}, {"SS", type any}, {"OF", type any}, {"SP", type any}, {"RP", type any}}),
#"Sorted Rows" = Table.Sort(#"Changed Type",{{"Order", Order.Ascending}})
in
#"Sorted Rows"

Avatar
ExcelNovice2020
Member
Members
Level 0
Forum Posts: 62
Member Since:
February 8, 2020
sp_UserOfflineSmall Offline
2
March 18, 2020 - 10:17 am
sp_Permalink sp_Print

Still not smart enough to figure out my mistake.  However, all that I did was added an index column prior to the #"Expanded ADP with Drafted" and that solved the problem.  

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Mynda Treacy, Syed Hussain
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 185
Newest Members:
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Doug Milne
Siobhan Stringer
Rob Rooth
Tom Lewis
Jennifer Rodriguez-Avila
Forum Stats:
Groups: 3
Forums: 24
Topics: 6542
Posts: 28641

 

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

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • 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

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

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

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.