Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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[OrderDate]<DATE(2011,1,1))
RETURN
IF(
HASONEFILTER(InternetSales[CustomerKey]),
CONTAINS(TempTable,Customer[CustomerKey],currCustomer),
BLANK()
)But every record returns false. What am I doing wrong? Sample is Here
Thanks in advance
Solved! Go to Solution.
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()
)
@tex628 Hi,
I dont need date column. Only customer Key, Name and the measure. For those customers below it must return true
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()
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 122 | |
| 106 | |
| 47 | |
| 30 | |
| 24 |