The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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: