Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
How do you do a 'not equal to' across tables?
I have 2 tables. Table 1 has columns: Unique ID, Field A & Field B.
Table 2 has Unique ID only.
I need to create a column in Table 2 that returns "Pass" or Fail", depending on what is in Table 1, Field A and Field B. For example:
if Table 1[Field A] equals "1" or "2" or "3" or "4" and Table 1[Field B] does not equal "1" then "Fail"
OR
if Table 1[Field A] does not equal "1" or "2" or "3" or "4" and Table 1[Field B] does equal "1" then "Fail"
Thankful for any help
Solved! Go to Solution.
Is this along the lines you're looking for?
Pass/Fail =
VAR A = LOOKUPVALUE ( Table1[FieldA], Table1[ID], Table2[ID] )
VAR B = LOOKUPVALUE ( Table1[FieldB], Table1[ID], Table2[ID] )
RETURN
IF (
( A IN { "1", "2", "3", "4" } && B <> 1 ) ||
( NOT ( A IN { "1", "2", "3", "4" } ) && B = 1 ),
"Fail",
"Pass"
)
Is this along the lines you're looking for?
Pass/Fail =
VAR A = LOOKUPVALUE ( Table1[FieldA], Table1[ID], Table2[ID] )
VAR B = LOOKUPVALUE ( Table1[FieldB], Table1[ID], Table2[ID] )
RETURN
IF (
( A IN { "1", "2", "3", "4" } && B <> 1 ) ||
( NOT ( A IN { "1", "2", "3", "4" } ) && B = 1 ),
"Fail",
"Pass"
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |