Pivot Table could not detect relationship but Diagram view has relationship

INN

Board Regular
Joined
Feb 3, 2021
Messages
124
Office Version
  1. 365
Platform
  1. Windows
Hi
I have 2 tables and I added them to data Model of Power Pivot. I went to Diagram View and then Dragged Name from the frist box and matched with the Employee Name in the second box, so a relationship 1-to Many has established. Please see below. Why when I create pivot table it says that could not detect relationship? The diagram view is showing I have a relationship? Thanks you very much.

SNAG-0985.jpg
SNAG-0984.jpg

Worksheet in week11.xlsx
ABCDEFGHIJ
1NameGenderDepartmentLocationPhone#Employee NameAgeSalary
2Judith CollingwoodFemaleManagementNew Jersey1-227-803-3871Judith Collingwood51$75,514
3Lara StylesFemaleSalesIdaho2-240-511-3733Lara Styles41$43,096
4Gloria VassFemaleManagementCalifornia1-063-681-2743Gloria Vass38$65,387
5Matt YatesMaleMarketingArizona4-375-511-3060Matt Yates56$116,185
6Hayden BarclayMaleSalesVirginia3-001-423-6756Hayden Barclay36$111,150
7Rosa GardnerFemaleITNebraska5-744-575-0520Rosa Gardner26$98,529
8Carter DuboisMaleOperationsMaryland3-211-804-8643Carter Dubois40$49,778
9Alan RichardsonMaleFinanceConnecticut0-816-613-1802Alan Richardson33$49,932
10Jackeline ChapmanFemaleAccountingOregon2-646-560-5822Jackeline Chapman53$76,402
11Domenic NaylerMaleSalesOklahoma6-430-606-8001Domenic Nayler42$77,921
12Kimberly FunnellFemaleResearch and DevelopmentWyoming7-242-321-1781Kimberly Funnell18$16,574
13Aiden HallMaleHuman ResourcesRhode Island1-500-456-6567Aiden Hall60$83,550
14Gabriel LakeyMaleSalesUtah3-624-321-7715Gabriel Lakey51$102,954
15Willow HoltFemaleITAlaska4-471-266-5742Willow Holt36$119,237
16Drew DunbarFemaleITArizona3-484-738-1631Drew Dunbar44$25,361
17Elle AshleyFemaleFinanceWyoming1-600-105-8467Elle Ashley18$35,617
18Valentina WiddowsFemaleResearch and DevelopmentDelaware8-363-618-8524Valentina Widdows42$105,488
19Rocco MillerMaleOperationsTennessee1-251-243-4250Rocco Miller28$53,658
20Teagan ThompsonFemaleManagementColorado3-426-351-1460Teagan Thompson26$96,004
21Sara RossiFemaleSalesNew Mexico7-211-682-7447Sara Rossi29$97,499
22Janelle WhatsonFemaleMarketingWyoming6-827-664-0662Janelle Whatson55$79,176
23Clint BealMaleHuman ResourcesWyoming5-114-658-7802Clint Beal44$16,917
24Shannon VincentFemaleManagementMichigan7-445-055-0810Shannon Vincent21$79,967
25Thea BaileyFemaleSalesAlaska1-705-832-8762Thea Bailey57$16,781
26Daria HarveyFemaleITOhio0-065-554-3738Daria Harvey41$75,939
27Noah RichardsMaleManagementColorado6-238-711-5273Noah Richards51$84,884
28Kamila TurnerFemaleMarketingConnecticut4-202-514-1182Kamila Turner23$17,023
29Eduardo DysonMaleOperationsWest Virginia1-820-274-8361Eduardo Dyson58$80,291
30David CoxMaleResearch and DevelopmentOklahoma8-533-107-6628David Cox54$14,730
31Mark RyanMaleITArkansas1-888-244-2243Mark Ryan65$44,025
32Miley TyrrellFemaleMarketingOregon3-712-084-3455Miley Tyrrell47$113,552
33Alba DurrantFemaleOperationsRhode Island7-188-607-0853Alba Durrant48$44,845
34Oliver HuntMaleOperationsWashington1-147-183-5687Oliver Hunt25$12,939
35Javier TennantMaleManagementNorth Dakota0-011-563-1020Javier Tennant27$23,598
36Jade AttwoodFemaleSalesNebraska0-001-514-2818Jade Attwood27$69,731
37Boris MurrayMaleManagementMichigan2-530-431-6052Boris Murray30$110,057
38Bryce DaviesFemaleHuman ResourcesDelaware1-228-375-7553Bryce Davies33$54,977
39Jacob CobbMaleHuman ResourcesNew Hampshire0-336-458-3542Jacob Cobb28$77,189
40Crystal PatelFemaleResearch and DevelopmentVermont1-705-766-2777Crystal Patel35$109,860
41Samantha StevensFemaleSalesVermont5-485-653-4723Samantha Stevens47$110,260
HR_1
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi,

I just tried, and it works fine I guess.
It looks like you dragged your relationship from HR_1 -> HR_2. It did the opposite.

1669095545687.png



1669095568800.png


/Skovgaard
 
  • Like
Reactions: INN
Upvote 0
Thank you very much for your help. Yes I did from HR1 to HR2 because HR1 is the Fact table. The lookup table is HR2. So the 1-to-Many relationship should be the other way around, 1 to the HR2 and * to HR1, am I right? Thanks again.
 
Upvote 0
Sorry, I want to ask another question. When I let excel to detect the realtionship and create one, based on what excel will decide which one is the Fact table and which one is the lockup table? For this example, Excel will pick the HR2 as a fact table and HR1 as lookup table, which is not right I think. Thank you again.
 
Upvote 0
Thank you very much. Never thought about that. Now it makes sense.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top