Forum Discussion
jereaallikko
Helper III
4 years agoCalculated Column to Check if Field CONTAINS Value From Another Table Column
Hi all, I am trying to create a calculated column to check if a column contains value from mapping table column, if not, then to check another column whether it contains value from mapping table ...
- 4 years ago
Hi,
Please check the below picture and the attached pbix file.
Output CC = VAR _firstcondition = LOOKUPVALUE ( Table2[Piece], Table2[Piece], Table1[Piece] ) VAR _secondcondition = SUMMARIZE ( FILTER ( Table2, CONTAINSSTRING ( Table1[Title], Table2[Piece] ) ), Table2[Piece] ) RETURN IF ( _firstcondition <> BLANK (), _firstcondition, IF ( _secondcondition <> BLANK (), _secondcondition, BLANK () ) )
Jihwan_Kim
Super User
4 years agoHi,
Please check the below picture and the attached pbix file.
Output CC =
VAR _firstcondition =
LOOKUPVALUE ( Table2[Piece], Table2[Piece], Table1[Piece] )
VAR _secondcondition =
SUMMARIZE (
FILTER ( Table2, CONTAINSSTRING ( Table1[Title], Table2[Piece] ) ),
Table2[Piece]
)
RETURN
IF (
_firstcondition <> BLANK (),
_firstcondition,
IF ( _secondcondition <> BLANK (), _secondcondition, BLANK () )
)