Results 1 to 2 of 2

Thread: Please help with a DataSource.Error when merging two connections in power query

  1. #1
    Neophyte Simonf's Avatar
    Join Date
    Feb 2021
    Excel Version

    Please help with a DataSource.Error when merging two connections in power query

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi Everyone,

    I have been working with a complicated series of connections merging data from different sources (Excel sheets and salesforce reports and tables) together into the format needed for reporting. It has all been working fine so far but when I tried to do a merge on two tables (one coming from a salesforce object and the other the result of several merges) it has come up with an error message:

    Date_of_first_arrival_in_the_UK__c FROM Contact WHERE TRUE
    ERROR at Row:1:Column:198
    unexpected token: 'TRUE'

    The strange thing is that the preview is loading all the rows exactly as I want it to, there is just an additional row added that says error in all the columns and when you click on it it comes up with the above message. It is also wierd that it mentions column 198 because I definitely don't have 198 columns in my data. The messages highlights a particular column name ('Date_of_first_arrival_in_the_UK__c') but is not specific to that column becuase when I remove that column from the table expansion it changes the error message to the next column. The error message starts to appear after expanding out the merged connection.

    Can anyone explain to me why this is happening and what I might be able to do to fix the problem? Thanks very much in advance

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Nanaimo, BC, Canada
    Blog Entries
    Excel Version
    Excel Office 365 Insider
    Hi Simon,

    Would need to see the query's M code, but are you pulling from a SQL server? To share the query, go to the query --> advanced editor and copy paste that code here. Just please wrap it in [code] your code [/code] tags to make it easier to read.
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book Master Your Data for Excel and Power BI, or our new Power Query Recipe cards!

    Main Site: -||- Blog: -||- Forums:
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts