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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am trying to make a new calculated column or measure (whichever is compatible) in my report. I am running into some issues however do to the data being accessed via Direct Query.
I was initially trying to create the following custom column:
If the measure [CRQ Success] contains the keyword “Canceled”, or “Failed”, I would like the new custom column to say “FAIL”. Otherwise I would like the new column to say “Success” . (See pic)
I believe this is a simple DAX statement, but I have been running into an error the way I have approached the issue because I am using Direct Query for this dataset.
Example Data:
CRQ Success | NEW COLUMN |
Success, Success | Success |
Canceled | FAIL |
Success, Canceled | FAIL |
Failed, Success | FAIL |
Solved! Go to Solution.
Hi @Anonymous ,
We can use CONTAINSSTRING function to meet your requirement.
We can create a measure like this,
We can create a measure like this,
Measure =
IF(
CONTAINSSTRING( MAX('Table'[CRQ Success]),"Canceled"),"FAIL",
IF(
CONTAINSSTRING(MAX('Table'[CRQ Success]),"Failed*"), "FAIL", "SUCCESS"))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
We can use CONTAINSSTRING function to meet your requirement.
We can create a measure like this,
We can create a measure like this,
Measure =
IF(
CONTAINSSTRING( MAX('Table'[CRQ Success]),"Canceled"),"FAIL",
IF(
CONTAINSSTRING(MAX('Table'[CRQ Success]),"Failed*"), "FAIL", "SUCCESS"))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous - You may have better luck with a measure versus a column.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 101 | |
| 76 | |
| 56 | |
| 51 | |
| 46 |