简体   繁体   English

使用表A中的相同键联接Power BI上的两个表

[英]Join two tables on Power BI using same key in Table A

I'm attempting to create multiple joins with two tables (Table A + Table B) using the same key from Table A. The key on table A is "Name" and there are multiple columns in Table B that I need to join this with. 我试图使用表A中的相同键创建两个表(表A +表B)的多个联接。表A上的键为“名称”,并且表B中有多个列需要与之连接。 Any ideas on the best way to do this? 关于最佳方法的任何想法吗?

Just go ahead and do it. 只是去做。 Power BI allows multiple relations between tables, but only one of them will be "active": Multiple Relationships Between Tables Power BI允许表之间存在多种关系,但是其中只有一个是“活动的”: 表之间存在多种关系

To use inactive relations, you will have to refer to them in DAX using function called USERELATIONSHIP 要使用非活动关系,您将必须使用名为USERELATIONSHIP的函数在DAX中引用它们

Alternatively, you can replicate your table A as many times as you need, and setup regular relations. 或者,您可以根据需要多次复制表A,并设置常规关系。 In my opinion, it's a better data model - it's more intuitive and easier to use. 我认为,这是一个更好的数据模型-更直观,更易于使用。

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

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