Forum Discussion
Finding a match in multiple fields
- Anonymous1 year ago
Hi Creative_tree88,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Please try the fallowing dax to create calculated column in activity table.
Validity Check =
VAR UserID = Activity[USER_ID]
VAR Modality = Activity[MODALITY]
VAR PermittedModalities =
", " & SUBSTITUTE(
LOOKUPVALUE(UserModalities[MODALITIES], UserModalities[USERID], UserID),
",", ", "
) & ","
VAR ModalityCheck = ", " & Modality & ","
RETURN
IF (
SEARCH(
ModalityCheck,
PermittedModalities,
1,
0
) > 0,
"OK",
"NOT VALID"
)I’ve attempted to recreate the scenario using sample data.
If you find this response helpful, please consider marking it as the accepted solution and giving it a thumbs-up to support others in the community.
Thank you & regards,
Prasanna Kumar
Hi Creative_tree88,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Please try the fallowing dax to create calculated column in activity table.
Validity Check =
VAR UserID = Activity[USER_ID]
VAR Modality = Activity[MODALITY]
VAR PermittedModalities =
", " & SUBSTITUTE(
LOOKUPVALUE(UserModalities[MODALITIES], UserModalities[USERID], UserID),
",", ", "
) & ","
VAR ModalityCheck = ", " & Modality & ","
RETURN
IF (
SEARCH(
ModalityCheck,
PermittedModalities,
1,
0
) > 0,
"OK",
"NOT VALID"
)
I’ve attempted to recreate the scenario using sample data.
If you find this response helpful, please consider marking it as the accepted solution and giving it a thumbs-up to support others in the community.
Thank you & regards,
Prasanna Kumar