+ Reply to Thread
Results 1 to 6 of 6

One to Many Relationship

  1. #1
    Registered User
    Join Date
    03-20-2018
    Location
    PA, USA
    MS-Off Ver
    2016
    Posts
    2

    One to Many Relationship

    Hello,

    I am trying to create my first pivot table. I have two tables, one containing unit serial numbers and assembly numbers. In this table serial numbers are unique and multiple serial numbers can have the same assembly number. In my second table I have each assembly number with columns containing details about the assembly. In this table each assembly number appears only once. Excel will not auto detect the relationship and when I try to manually create a relationship between the two tables using the assembly number I get the following error:

    "At least one of the selected columns contain duplicate values. Both selected columns must contain only unique values to create a relationship between the tables."

    I cant figure out why I get this message. Excel supports one to many relationships, so why does this message state otherwise? In my attempts to research a solution I can only find reports of a similar error where people are attempting to create a many to many relationship, but this message says something along the lines of "At least one of the selected columns must contain only unique values".

    Thanks for the help!

    Nick

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: One to Many Relationship

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    03-20-2018
    Location
    PA, USA
    MS-Off Ver
    2016
    Posts
    2

    Re: One to Many Relationship

    Attached is a simplified version of my workbook. "Drawing No." is column in each table I am trying to relate. The first table "Master" has a column of unique "Serial"s, each with a "Drawing No.". The second table has a column with each "Drawing No." .
    Attached Files Attached Files

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: One to Many Relationship

    Drawing No. 08-0702 has two rows in your "Drawing" table.

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: One to Many Relationship

    FYI, to find this, I added a calculated column on table 'Drawing' with the following DAX:

    Please Login or Register  to view this content.
    Then applied a filter to this calculated column, for values >1.

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

    Cool Re: One to Many Relationship

    First Refresh All in your DataModel then try again rel

    rel.jpg
    Last edited by sandy666; 03-20-2018 at 12:12 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. [SOLVED] Many to Many Relationship
    By NetherLance in forum Excel General
    Replies: 3
    Last Post: 09-15-2017, 08:29 AM
  2. One to many relationship
    By Bikashmittle in forum Excel General
    Replies: 0
    Last Post: 02-10-2017, 01:42 PM
  3. [SOLVED] How to group 1 to many relationship
    By csh8428 in forum Excel General
    Replies: 5
    Last Post: 07-14-2016, 10:01 PM
  4. Match Many to many relationship
    By excelodog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2013, 10:52 PM
  5. Create a one to one relationship
    By austenr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2013, 02:43 PM
  6. [SOLVED] relationship table
    By pankaj8219 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-07-2013, 09:33 AM
  7. relationship
    By Cboggie in forum Access Tables & Databases
    Replies: 2
    Last Post: 12-22-2011, 08:39 AM

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