dax检查一个值是否匹配另一个表的值
在PowerBi台式机中,我有两个不同的表,其中包含不同的数据,可以共享1列。表包含有关产品的信息,每个表都有一个名为“ SKU ID”的列。我想创建一个量度,以计算来自其他表格中有多少产品具有匹配的SKU ID。我希望这是有道理的。以下是我的表:
所以我只想要一个措施来计算多少个产品名称具有与卡车路线相匹配的SKU ID。我被困了好几天了!谢谢大家!
更新 文本格式的表格如下:
Product Name | SKU ID
------------------------------
Toy 182772
Boat 294773
Car 928844
Cup 277453
Plate 933111
Chair 182772
Table 182772
Remote 277453
Fork 933111
Truck Route | SKU ID
--------------------------
MEM1 182772
SDF3 294773
DTW1 928844
SAN8 277453
MIA8 933111
MIA8 182772
SAN8 182772
MEM1 277453
SDF3 933111
**我正在寻找一个结果,如果您单击MEM1-3的PowerBi中的表桌子。
In PowerBi desktop I have two different tables with different data that share 1 column. The tables contain information about products and each table has a column titled "SKU ID". I want to create a measure that counts how many products have a matching SKU ID from a different table. I hope that makes sense. Below are my tables:
So I just want a measure that counts how many Product Names have a SKU ID that matches a Truck Route with the same SKU ID. I've been stuck for days! Thank you all in advance!
UPDATE
Tables in text format are as follows:
Product Name | SKU ID
------------------------------
Toy 182772
Boat 294773
Car 928844
Cup 277453
Plate 933111
Chair 182772
Table 182772
Remote 277453
Fork 933111
Truck Route | SKU ID
--------------------------
MEM1 182772
SDF3 294773
DTW1 928844
SAN8 277453
MIA8 933111
MIA8 182772
SAN8 182772
MEM1 277453
SDF3 933111
** I am looking for a result where if you click on the table in PowerBi on route MEM1 - 3. So when you click on MEM1, the count of matching SKU IDs is returned from the Product name table.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的数据对我来说看起来很不寻常,因此很难确切地知道输出的外观。通常,您会使用关系在PBI中实现这一目标,但是正如我所说,您的数据很难理解而没有更多背景。是您想要的以下内容:
如果是这样,请添加表格并添加卡车路由和SKU ID字段,以确保它们设置为不总结。
添加一个度量如下:
将措施拖入表中为第三列。
Your data looks very unusual to me so it is hard to know precisely what the output should look like. Normally, you would achieve this in PBI using relationships but as I said your data is hard to understand without more context. Is the following what you want:
If so, add a table and add the truck route and SKU ID fields making sure they're set to Don't Summarise.
Add a measure as follows:
Drag the measure into the table as the 3rd column.