Forum Discussion
gauravnarchal
5 years agoPost Prodigy
Matching Columns in 2 Tables
I have two tables as shown below. I want to validate and match the values from Product column of table 1 with Product column of Table 2 else it should return “Incorrect Value”. Instead of creatin...
- 5 years agoIs there a relationship between the tables? If not, you can use something like:
IF( SELECTEDVALUE(Table1[Product]) IN VALUES(Table2[Product]), "valid", Incorrect") - 5 years ago
You can try
Measure = var _sv = RIGHT(SELECTEDVALUE(Table1[Ref ID]),2) VAR _LU = Calculate( FIRSTNONBLANK( Table 2[Category],0 ) , Table 2[Product] = _sv ) var _CV = Table1(ProductCategory) RETURN IF ( _LU = _SV, "Valid", "Incorrect Value" )
SteveCampbell
5 years agoMemorable Member
You can try
Measure =
var _sv = RIGHT(SELECTEDVALUE(Table1[Ref ID]),2)
VAR _LU = Calculate( FIRSTNONBLANK( Table 2[Category],0 ) , Table 2[Product] = _sv )
var _CV = Table1(ProductCategory)
RETURN
IF ( _LU = _SV, "Valid", "Incorrect Value" )