简体   繁体   English

Power Pivot:数据透视表显示每个城市的相关表

[英]Power Pivot: pivot table shows every city for related tables

Can someone help me figure out why all three towns are displayed in the Pivot Table (rows 8 through 17)? 有人可以帮我弄清楚为什么三个城镇都显示在数据透视表中(第8至17行)吗?

Blue table is connected to black table by customer name. 蓝表通过客户名称连接到黑表。 The output should show only customers B and C with their respective towns, however I end up seeing B and C, with every town that's referenced in the blue table. 输出应仅显示客户B和C及其各自的镇,但是最终我看到的是B和C,蓝色表中引用了每个镇。 在此处输入图片说明

在此处输入图片说明

I recreated your problem. 我重提了你的问题。 When I don't have a "properly" relationship between the tables you can get weird behaviour. 当我在表之间没有“适当的”关系时,您会得到怪异的行为。 The behaviour can occur when you don't have the tables linked, but that's not your case. 当您没有链接表时,可能会发生此行为,但事实并非如此。

So how is your link in the Power Pivot Manager? 那么您在Power Pivot Manager中的链接如何? The table to the right will be used as your source table with your unique primary key and the other table will "feed" your source table. 右边的表将用作具有唯一主键的源表,另一个表将“提供”您的源表。 So it depends how you want to analyze the data. 因此,这取决于您要如何分析数据。

My looks like the following, and here is the problem.. your dependency goes from tLocal -> tData. 我的样子如下,这就是问题所在。.您的依赖项从tLocal-> tData开始。 It should be tData -> tLocal: 应该是tData-> tLocal:

View below is: The pivot table to the left is "tLocal -> tData", to the right is "tData -> tLocal" 下面的视图是:左侧的数据透视表是“ tLocal-> tData”,右侧是“ tData-> tLocal”

在此处输入图片说明

View of the relationship table: 关系表的视图:

在此处输入图片说明

In the "Manage Relationshops" table your can modify your existing setup (you can see mine in the 2nd window, and choose "Create" a new). 在“管理关系商店”表中,您可以修改现有设置(您可以在第二个窗口中看到我的设置,然后选择“创建”一个新的)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM