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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dusky186
New Member

Power Bi should at least have some support of regular expressions natively

The second major bottleneck with adoption of power bi in my organization deals with support of  POSIX regex in data transformation.  Does Power BI finally support natively, Regular expression standards for character classes?

https://en.wikipedia.org/wiki/Regular_expression#Character_classes

 

The answer I have gotten so far is no, but I've been checking back once every 6 months to see if the answer is finally yes. 

 

This is a business problem, not everyone at an organization will have coding experience, even fewer dealing with cleaning up text, and probably one person like myself who is actually trained in cryptography.   With C-level executives it is easier to teach them regular expressions than it is the standard replace chain operators (relatively speaking).  In fact it allows one to talk at a higher level about what the purpose text clean up is.  To go from syntaxt to data science.  For example.... in psuedo code.... 

  • Replace(Replace(<any column>,[:alpha:]),[:digit:])) is the regular expression for discovering how a column or document is parsed. Many national standard files such as NFIRS still have industry-standard file encoding these days so correcting and reading the nonstandard encoding files requires the ability to parse the synax of a file. 
  • Extract(<any column>,[:cntrl:]) or Extract(<any column)>,[:graph:]) is super useful for discovering non-visable characters and sometime emojis.  If you use instagram or twitter or any social media text data this is useful to do then the alterative of a about 1447 times recursive Replace() statement using the national standards for emojis: https://unicode.org/emoji/charts/full-emoji-list.html (and yes, I have done this before using replace and using if/else)

In short because power bi does not natively support more elegant forms of text clean up natively, its very hard to have user adoption or engagement data clean up principles with power bi. 

 

While the computer coder in me is always happy to grow the coding community, the business end user in me thinks it makes no sense to adopt Power BI when they perfectly fine using the one that gets them the results.  

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @dusky186 ,

 

Power BI itself is not capable to filter or select by a regular expression. As a workaround, the following blog shows you how you can use regular expressions in Power BI by using the R transformation steps.

Using regular expressions in power bi desktop - Microsoft Power BI Community

 

 

Best Regards,

Stephen Tao

 

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

View solution in original post

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @dusky186 ,

 

Power BI itself is not capable to filter or select by a regular expression. As a workaround, the following blog shows you how you can use regular expressions in Power BI by using the R transformation steps.

Using regular expressions in power bi desktop - Microsoft Power BI Community

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors