Forum Discussion

Fcoatis's avatar
Fcoatis
Post Patron
7 years ago
Solved

Contains

Hello, I need to create a measure to check values against a virtual table like this:   Test = VAR currCustomer = VALUES(Customer[CustomerKey]) VAR TempTable = FILTER(InternetSales,InternetSales[O...
  • tex628's avatar
    tex628
    7 years ago

    Just replace ur measure with this;

    Test = 
    VAR currCustomer = SELECTEDVALUE(Customer[CustomerKey])
    VAR TempTable = FILTER(InternetSales,InternetSales[OrderDate]<DATE(2011,1,1))
    RETURN
    IF(
        CONTAINS(TempTable,Customer[CustomerKey],currCustomer),
        TRUE(),
        FALSE()
    )