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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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"
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 21 | |
| 17 | |
| 11 | |
| 10 |