• 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

Link two tables, and show data from the 3rd|Power Pivot|Excel Forum|My Online Training Hub

You are here: Home / Link two tables, and show data from the 3rd|Power Pivot|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
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 PivotLink two tables, and show data from…
sp_PrintTopic sp_TopicIcon
Link two tables, and show data from the 3rd
Avatar
Derek Jones

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
August 8, 2021
sp_UserOfflineSmall Offline
1
August 8, 2021 - 1:04 am
sp_Permalink sp_Print

I'm new to Power Query and Power Pivot.  I'm creating a dashboard, and having some trouble mastering the relationships between tables.   There's some constraints / database logic at work. 

In this simplified example I'd like to create a pivot table that shows the "Client Rate" applicable to the "Named Resource"
e.g. Amy, is an actor.  Actors are classified as Entertainment.  Entertainment has a client rate of $150.  Therefore I'd like to show in a pivot table Amy, and the rate of $150.  Refer to the image attached

Table A

Named Resource, Role A

Amy, Actor

Cristina, Bar person

Table B

Role B, Classification 

Actor, Entertainment

Bar person, Hospitality

Table C

Classification, Client Rate

Entertainment, $150

Hospitality, $180

The tables are joined 1 to many on Role (Tables A to B), and Classification (Tables B to C). 

When I create a pivot table with

  • Named Resource & Role A in rows, and
  • Sum of Client rate in Values,
    • The table contains these values
      • Named Resource, Role A, Sum of Client Rate
      • Amy, Actor, 330
      • Cristina, Bar person, 330
    • I would like it to show these values
      • Named Resource, Role A, Sum of Client Rate
      • Amy, Actor, 150
      • Cristina, Bar person, 180Power-Query-relationships-1.jpgImage Enlarger

Hope that makes sense.  Can you help me achieve the above result, and understand the database logic that makes it work the way it does?

sp_PlupAttachments Attachments
  • sp_PlupImage Power-Query-relationships-1.jpg (48 KB)
sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4614
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
August 9, 2021 - 10:20 am
sp_Permalink sp_Print

Hi Derek,

Welcome to our forum! Please upload your sample Excel file shown in the screenshots so we don't have to recreate your data to help you.

Thanks,

Mynda

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 880
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
3
August 11, 2021 - 10:22 pm
sp_Permalink sp_Print

Hello Derek,

I understand what you are trying to achieve, but even though Excel can handle big data in the Data Model it is not a relational database as such.
Relationships in the Data Model works when you have a 1 to many relation, where the tables on the many side are the tables where you want to get the values from and where the tables on the 1 side are those which you want to sort or filter by.

Based on your sample data (which in reality is to small to be separated like this) you should have following tables.

Table A
Named resource, Role, Internal rate, Client rate

Table B
Role, Classification

Br,
Anders

sp_AnswersTopicAnswer
Answers Post
Avatar
Derek Jones

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
August 8, 2021
sp_UserOfflineSmall Offline
4
August 15, 2021 - 12:16 pm
sp_Permalink sp_Print

Thanks Mynda and Anders, 

I was assuming because the 3 tables were linked that I could then just data from table 1 to get related data from table 3.  From my experimenting and your answer Anders I can see that this is not the way forward. 

Instead I used the Join function.  A left join gave me the connections I needed to show the person, and their rate, and to also keep the data tables in the same structure. 

Cheers, 

Derek

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Tracy English, David Birch, QSolutions Group
Guest(s) 10
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
jaryszek: 183
Newest Members:
Jennifer Rodriguez-Avila
Khaled Ibrahim
Kiran Supekar
Lisa Myers
Ronald White
Ginette Guevremont
Taryn Ambrosi
Mark Davenport
Christy Nichols
Harald Endres
Forum Stats:
Groups: 3
Forums: 24
Topics: 6530
Posts: 28602

 

Member Stats:
Guest Posters: 49
Members: 32820
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.