+ Reply to Thread
Results 1 to 4 of 4

Data Model Relationship Troubles

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Data Model Relationship Troubles

    I am struggling (again!) in trying to understand creating Relationships with a DataModel

    I've made a basic sample that has 3 tables. The goal/exercise is to be able to pick a a 'SiteGroup' and then get the Revenue and Expense for those locations.

    So I have a 'CompanyList' table that list 50 locations.
    And then a 'SiteGroup' Table that puts these locations into different groups.
    And a data table listing locations and some revenue/expense numbers.

    And then have a relationship (1 to many) between the CompanyList and SiteGroup and another relationship (1 to many) between CompanyList and Data.

    From everything I understand, I think this should be working? Excel doesn't even want to detect and make the relationships automatically either, and I have to manually create them. Even though same column names and types.

    Can anyone possibly point out where I'm going wrong?

    Sample File attached.

    Edit: Updated Sample attached as was not fully sanitized the data, but still not working as expected.

    Thanks,
    PT

    SiteScreenShot.png
    Attached Files Attached Files
    Last edited by ptmuldoon; 01-23-2021 at 12:28 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Data Model Relationship Troubles

    I would guess you need a table Sites that just has your 5 groups - then your current Sitegroups table would become a join table, I have not set up tables like a DB in excel before, but do you need ID's?
    If this solves your issue, Mark thread as Solved & Add Reputation.

    Thanks!

  3. #3
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Data Model Relationship Troubles

    Thanks

    I am pretty sure I should not need a separate table for the groups, and am/was setting it corrrectly.

    I think the issue is that Power Pivot in excel cannot do a many to many relationship. But I did find a work around after a bit of searching in that you can create a measure and use "CROSSFILTER" in creating a many to many relationship that way.

    So after creating a measure like this, I got it working:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Data Model Relationship Troubles

    That is why I was thinking an additional table - however, good for the work around

+ 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. How to make a time period a variable for this model? (automating the model)
    By pigment01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2015, 12:47 PM
  2. Create a model that will generate a column of numbers based on model parameters
    By tncanoeguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 05:47 PM
  3. Relationship between Cell and Data Tables
    By NeshaNYC in forum Excel General
    Replies: 0
    Last Post: 08-15-2011, 10:55 AM
  4. Creating relationship between 2 sheets of data
    By Evetsllub in forum Excel General
    Replies: 1
    Last Post: 07-14-2010, 04:37 AM
  5. Data Relationship?
    By Q-D in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2009, 10:13 AM
  6. Data Validation List Troubles
    By t1b1 in forum Excel General
    Replies: 7
    Last Post: 09-23-2009, 09:18 AM
  7. Merge data with 9-to-4 relationship
    By francisco in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2009, 08:08 PM

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