+ Reply to Thread
Results 1 to 10 of 10

Power Query finds and displays merge, but returns null when expanding the table

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    Holland
    MS-Off Ver
    2016
    Posts
    23

    Power Query finds and displays merge, but returns null when expanding the table

    Hi guys,

    Based on an ID number, I would like to merge two tables (both stored in the Data Model). First look gives a hopeful guess, matching almost all rows.

    PowerQueryMatching.png

    Also, when I select the "table" cell of the second table:

    select.png

    Under the table, it tells me I get a match indeed!

    MatchIntable.png

    BUT! Upon expanding the table, I receive "null". Both "Accession numbers" are of the same type, and there are no unprintable characters, case differences, or spaces.

    null.png

    I've got Excel's 2016 version with the following ribbon:

    null.png

    Could someone help me with this annoyance?

    With kind regards,

    Max

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query finds and displays merge, but returns null when expanding the table

    scroll down merged table to see if there is your data from HDB
    Hard to say something from the picture

  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    Holland
    MS-Off Ver
    2016
    Posts
    23

    Re: Power Query finds and displays merge, but returns null when expanding the table

    No, my data is not there. Here two more explanatory pictures. In the first you can clearly see that there is a match.

    Betterview.png

    But here, it returns "null"

    betterview 2.png

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query finds and displays merge, but returns null when expanding the table

    you've duplicates there (row 4,5)
    everything is ok because appropriate IDs are in correct places, see row 4,5,8
    what you want to achieve?
    do you know how merging table with LeftOuter works?

  5. #5
    Registered User
    Join Date
    05-05-2016
    Location
    Holland
    MS-Off Ver
    2016
    Posts
    23

    Re: Power Query finds and displays merge, but returns null when expanding the table

    What I would like to achieve is that every "protein accession number without decoy" gets extra information from the '"HDBTable".
    I already did perform the LeftOuter, bu apparently I need another? Kind of confusing, since the duplicates underneath "Q8WU90" both get the information assigned.

    We'll get there eventually

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query finds and displays merge, but returns null when expanding the table

    IMHO ID shouldn't be duplicated if it is a primary key from Access. ID identifies each unique record (should) but in this case it doesn't. But maybe I'm wrong
    As you can read: LeftOuter (all from first matching from second)
    I think you can:
    remove duplicates (rows) from first query
    remove dup[licates (rows) from second query
    sort by ID A-Z both tables
    then try to merge by Left Outer

    this is theory
    that way I can say maybe this, maybe that

  7. #7
    Registered User
    Join Date
    05-05-2016
    Location
    Holland
    MS-Off Ver
    2016
    Posts
    23

    Re: Power Query finds and displays merge, but returns null when expanding the table

    The problem eventually wasn't there afterall; "close and load" creates a table, and correctly connects the data.
    So here is my hypothesis: the power query window loads only parts of both tables, around 200 with a max of 1000 rows. I think that the preview window makes a match between two datasets with these first rows only.
    I would not call it a bug, but a message like "to be calculated" or something like that would be more descriptive that "null".

    Thanks Sandy for your help!

    Do you happen to know whether there is an option in a "normal" table — just like with pivot tables — to group duplicate names (with different specifics) with a + sign/collapsable button, i.e. creating a pivot table with extra explanatory rows?

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query finds and displays merge, but returns null when expanding the table

    You are welcome
    Thanks for the feedback

    Quote Originally Posted by max138 View Post
    I would not call it a bug, but a message like "to be calculated" or something like that would be more descriptive that "null".
    Call Microsoft

    "Normal" table you mean Excel Table?
    You can try with Filter/Custom Filter but I think this is not what you want
    or Advanced Filter

  9. #9
    Registered User
    Join Date
    05-05-2016
    Location
    Holland
    MS-Off Ver
    2016
    Posts
    23

    Re: Power Query finds and displays merge, but returns null when expanding the table

    Nah, a filter doesn't cut it. I'm looking for this:
    example.png

    In a pivot table that goes like walking, but I still have not stumbled upon a way to add extra descriptive data to pivot table's columns.

    Btw, might my English be unclear, please say so. It's not my native language

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query finds and displays merge, but returns null when expanding the table

    try to show what you want - manually (with table looks like pivot but it is not a pivot)
    and don't zoom pictures, please. it make me crosseyed

    in another words: attache example excel file with BEFORE (what you have) and AFTER (what you want)
    Last edited by sandy666; 11-29-2017 at 01:42 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Power Query - merge by part of the string
    By zico8 in forum Excel General
    Replies: 1
    Last Post: 07-31-2017, 04:32 AM
  2. [SOLVED] Pivot table from power query
    By pccamara in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 05-17-2017, 10:09 AM
  3. Power Query - add column with Table name
    By zico8 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-11-2017, 12:58 AM
  4. Merge Sheets Power Query
    By morerockin in forum Excel General
    Replies: 8
    Last Post: 04-11-2017, 08:17 AM
  5. How to remove null values from several columns with Power Query?
    By toblju in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2016, 11:08 AM
  6. Power Query, merge 2 or more large files in one
    By Remphan in forum Excel General
    Replies: 0
    Last Post: 03-02-2016, 04:28 AM
  7. Power Query, merge 2 or more large files in one
    By Remphan in forum Excel General
    Replies: 0
    Last Post: 03-02-2016, 03:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1