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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi, I am new to Power BI and have below question looking for help!
I am trying to create a new column that will help me distinguish pages with or without keyword: "base-center/secure". I have written this formula but it is getting error:
Solved! Go to Solution.
Hi @Anonymous
If you want a calculated column with DAX, it should be
flag =
IF (
CONTAINSSTRING ( Pageviews[page_pagePath], "base-center/secure" ),
"center visit",
"null"
)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Anonymous
If you want a calculated column with DAX, it should be
flag =
IF (
CONTAINSSTRING ( Pageviews[page_pagePath], "base-center/secure" ),
"center visit",
"null"
)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
CONTAINSSTRING is a DAX function, not an M function (Power Query language).
In M, you'd write it like this:
if Text.Contains([page_pagePath], "base-center/secure") then "center visit" else "null"
assuming that [page_pagePath] is a column in the same table you're working with.