Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Format Filter

Jay-RDC
8 - Asteroid

Hello, 

 

I'm trying to create a filter where if the value of a field doesn't match a specific format then F. I need a Regex match formula specific to USD currency format (e.g. $500.00, $5,000.00) and US address format (e.g. 1234 Street, Houston TX 12345 or 1234 Houston way, Houston TX, 12345. Any tutorial available in writing a Regex match formula for a filter tool?

 

 

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @Jay-RDC 

 

For currency to can use startswith function and get the job done. For address what's the format you are looking for.

 

atcodedog05_0-1644474826044.png

 

Resource on Regex: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

You can use REGEX_Match() function is filter tool.

 

Hope this helps : )

Jay-RDC
8 - Asteroid

Hello,

 

Thanks for the response. For the currency format I actually needed to filter out which fields has the correct format. So if the format fits the requirement which is $1,000.00 or $100.00 it returns it as True or 1, if it does not meet the required format then false or 0.

atcodedog05
22 - Nova
22 - Nova

Hi @Jay-RDC 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1644510860199.png

 

Hope this helps : )

 

Jay-RDC
8 - Asteroid

@atcodedog05 Thanks for your help! I was able to figure it out. I use StartsWith([Value], '$') which you suggested then just added another filter using RegEx_Match REGEX_Match([Value], "^.\d{1}\,\d{3}\.\d{2}.*") or REGEX_Match([Value], "^.\d{3}\.\d{2}.*").

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Jay-RDC 

If my response helps please don't forget to mark it as solution.

Cheers and have a nice day!

Labels