Power BI and Regular Expressions

Avatar von Phil SeamarkPhil Seamark on DAX

I read a quote somewhere along the lines of…

If you are trying to solve a problem with regular expressions...
you now have two problems

This seems a little harsh for a useful tool that has been with us for what seems a very long time.  Plenty of languages offer support for RegEx string searching and pattern matching but not so far in Power BI Desktop.

I thought I would share a simple and quick way to enable the use of RegEx in Power BI.

This could be useful in a number of ways.  RegEx patterns could help validate strings from source systems:

  • Valid email addresses
  • URLs
  • IP addresses
  • Product Codes
  • Stripping numbers or texts from strings

I’m going to look at the first scenario and demonstrate with a simple exercise how you might use RegEx to test if email addresses are valid.

DAX and M don’t have any dedicated…

Ursprünglichen Post anzeigen 394 weitere Wörter


Kommentare

Hinterlasse einen Kommentar

Diese Seite verwendet Akismet, um Spam zu reduzieren. Erfahre, wie deine Kommentardaten verarbeitet werden..