Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
anshusaketsingh
Frequent Visitor

REGEXP_MATCH replication in DAX

So I recently found out Regexp is not supported by Power BI. I wonder why would they not put anything as powerful as that in PowerBI.

Anway, this has put me in a situation where I am unable to create a logic in Power BI for below logic in Tableau

 

CASE
REGEXP_MATCH([Error_Message],'.*PowerBI_needs_to_support_Regexp.*') Then TRUE
END

The above expression means that 

  1. .= any character except newline
  2. *=Any number of occurrences (including 0 occurrences)

 

Any suggestion how to do that in PowerBI without using Python or R?

 

3 REPLIES 3
FreemanZ
Super User
Super User

hi @anshusaketsingh ,

 

try to add a calculated column like:

column =

CONTAINSSTRING(

[Error_Message],

"PowerBI_needs_to_support_Regexp"

)

I am not looking for substring funtion , I am looking a way to check if first character is a character and then there are numbers only before substring begins, a containstring won't do that

Anonymous
Not applicable

Hi @anshusaketsingh ,

 

According to your statement, I think your requirement is to achieve your goal like regular expression in Power BI Desktop.

As far as I know, Power BI doesn't support this function directly. However you can try Python Script to do this.

Please refer to below blog to learn more details.

Using regular expressions in power bi desktop - Microsoft Fabric Community

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (27)