Powerbi Power Bi-查找不同表(参考表)中的值并返回True

Powerbi Power Bi-查找不同表(参考表)中的值并返回True,powerbi,compare,lookup,powerbi-desktop,Powerbi,Compare,Lookup,Powerbi Desktop,在Microsoft Power Bi中 我有850种产品,这些产品总共有15家供应商 我有两个表,第一个表显示了不同的产品列表,其中只有8家供应商从最低价格到最高价格(1到8)排序: 第二个表显示了每种产品的实际购买情况,包括供应商名称、数量和价格: 我需要一个列,检查供应商是否存在于每个产品的8个选项中,并返回true。如果不是,则应返回false 希望一切都清楚 谢谢大家:)您可以根据自己的需要使用下面的度量- true_false = var current_row_produc

在Microsoft Power Bi中

我有850种产品,这些产品总共有15家供应商

我有两个表,第一个表显示了不同的产品列表,其中只有8家供应商从最低价格到最高价格(1到8)排序:

第二个表显示了每种产品的实际购买情况,包括供应商名称、数量和价格:

我需要一个列,检查供应商是否存在于每个产品的8个选项中,并返回true。如果不是,则应返回false

希望一切都清楚


谢谢大家:)

您可以根据自己的需要使用下面的度量-

true_false = 

var current_row_product = MIN(Table2[product])
var current_row_vendor = MIN(Table2[vendor])

var find_vendor =  
CALCULATE(
    MAX(Table1[product]),
    FILTER(
        ALL(Table1),
        Table1[product] = current_row_product
        && current_row_vendor IN 
        {
            Table1[1st],
            Table1[2nd],
            Table1[3rd],
            Table1[4th],
            Table1[5th],
            Table1[6th],
            Table1[7th],
            Table1[8th]
        }
    )
)


RETURN IF(find_vendor = BLANK(), "FALSE", "TRUE")
下面是输出-


您可以根据自己的需要使用下面的测量-

true_false = 

var current_row_product = MIN(Table2[product])
var current_row_vendor = MIN(Table2[vendor])

var find_vendor =  
CALCULATE(
    MAX(Table1[product]),
    FILTER(
        ALL(Table1),
        Table1[product] = current_row_product
        && current_row_vendor IN 
        {
            Table1[1st],
            Table1[2nd],
            Table1[3rd],
            Table1[4th],
            Table1[5th],
            Table1[6th],
            Table1[7th],
            Table1[8th]
        }
    )
)


RETURN IF(find_vendor = BLANK(), "FALSE", "TRUE")
下面是输出-