在 powerbi 中使用相同的过滤器过滤两个表 [英] Filter two tables using the same filter in powerbi
问题描述
我有两张表格显示 PowerBI 中的国家/地区数据,一张表格包含不同国家/地区的销售数据,另一张表格显示每个国家/地区的统计数据.然后我有一个仪表板,其中包含每个表的图表.我想要一个过滤器来过滤两个表中的国家列.即,如果我过滤美国,我会得到一个显示美国销售数据的图表和一个显示美国其他统计数据的图表.
I have two tables showing country data in PowerBI, one table contains sales data in different countries and another shows stats about each country. I then have a dashboard that has a chart from each table. I want a single filter that filters on the country column in both tables. i.e. If I filter on the US, I will get a chart showing sales data in the US and a chart showing other stats about the US.
国家/地区列在两个表中都有重复值,因此很难在它们之间建立关系.此外,这些表并不是真正相互关联的,我只是过滤两者中的数据,以便我的仪表板更新两个图表.有什么帮助吗?
The country columns have duplicate values in both tables so doing a relationship between them is difficult. Moreover the tables are not really related to each other as such, I just to filter the data in both so my dashboard updates both charts. Any help?
推荐答案
创建一个仅包含唯一国家/地区列表的表,并将该表与其他两个表建立关系.然后使用该表作为过滤器,而不是两个原始表中的任何一个的国家/地区列.
Create a table that just has the list of unique countries and make a relationship from that table to both other tables. Then use that table for your filter, rather than the country column of either of the two original tables.
这篇关于在 powerbi 中使用相同的过滤器过滤两个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!