Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Everyone,
Need a DAX Column that returns "Block contract" if Tags Column contains "Block Contract", returns "2 : 1" if tags column contains "2 : 1", returns "1 : 1" if tags column contains "1 : 1" and returns "Block Contract" if none of the other conditions are met
any help is appreciated
🙂
Solved! Go to Solution.
Hi @cammar
Please try
Column2 =
SWITCH (
TRUE (),
CONTAINSSTRING ( 'Table'[Column], "Block Contract" ), "Block Contract",
CONTAINSSTRING ( 'Table'[Column], "2 : 1" ), "2 : 1",
CONTAINSSTRING ( 'Table'[Column], "1 : 1" ), "1 : 1",
"Block Contract"
)
Hi @cammar
Please try
Column2 =
SWITCH (
TRUE (),
CONTAINSSTRING ( 'Table'[Column], "Block Contract" ), "Block Contract",
CONTAINSSTRING ( 'Table'[Column], "2 : 1" ), "2 : 1",
CONTAINSSTRING ( 'Table'[Column], "1 : 1" ), "1 : 1",
"Block Contract"
)