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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi, hope someone can help me out with this DAX problem.
When I make this calculated column, it works fine:
However, when I try to add ("E03") in this calculated column, I get an error (Function 'CONTAINSROW' does not support comparing values of type Text with values of type True/False).
What do I do wrong and what can be the sollution?
Thank you very much. Regards, Elmer
Solved! Go to Solution.
Hi,
OR is evaluating two expressions and must return TRUE or FALSE for each,
You can try something like that:
VAR _ARRAY =
SELECTCOLUMNS(FILTER('Contract History', 'Contract History'[Person_BK]=EARLIER('Contract History'[Person_BK])),"1",RELATED('Employment type'[EmploymentType_BK]))
VAR CONDITION_1 =
"EO2" IN _ARRAY
VAR CONDITION_2 =
"EO3" IN _ARRAY
RETURN
IF( OR(CONDITION_1,CONDITION2), 1,0)
Thanx!
After mixing and trying this worked:
Hi,
OR is evaluating two expressions and must return TRUE or FALSE for each,
You can try something like that:
VAR _ARRAY =
SELECTCOLUMNS(FILTER('Contract History', 'Contract History'[Person_BK]=EARLIER('Contract History'[Person_BK])),"1",RELATED('Employment type'[EmploymentType_BK]))
VAR CONDITION_1 =
"EO2" IN _ARRAY
VAR CONDITION_2 =
"EO3" IN _ARRAY
RETURN
IF( OR(CONDITION_1,CONDITION2), 1,0)
Thanx!
After mixing and trying this worked: