community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Recognizing Wildcards From Data

Atom

I was wondering if Alteryx had the capability to recognize wildcards within my data. I am aware that Alteryx has a wildcard function (*), but I want to know if I have this in my data - how can I get it to act as a wildcard.

 

For example: Lets say I am joining data that acts as a "rule" for my data-set.

 

clipboard_image_2.png

 

In the example above, I would like Alteryx to recognize that the * is a wildcard. When doing a join, I would do it off of State, Invoice Description, and Year. I want Alteryx to know that if it is in PA in 2019 than the determination is always yes regardless of the invoice description and therefore, will join that data to my data-set.

 

I need all three criteria because sometimes the invoice description changes the determination. For example - NY in 2019 would change determinations depending on it being food or drinks in the invoice description.

 

Please let me know if this is enough information! Thanks!

Alteryx
Alteryx

I think you may need to add a filter where [Invoice Description] = "*"

 

Then you can have these records flow into a join tool and match on your second data set, but only join on State and Year for these records. For the records that flow out of the false anchor of the tool, join on State, Invoice Description, and Year. Then union the results of these joins together. The way that you describe the wildcard effectively means that the join criteria for that field is disregarded, so I think that my suggestion may work for your use case. 

Atom

Thank you! This works great!

Alteryx
Alteryx

Glad it works for you! One thing to make sure of is that because you are just joining on the two fields now, you want to make sure that you don't have additional duplicate records from the join. For that reason, you may want to use a unique tool on the secondary data that you are joining to where you unique on State and Year so that you end up with a 1 to 1 relationship. 

Atom

Okay thanks. Should I use the unique tool before or after the union?

Alteryx
Alteryx

I am thinking something like this

 

Join Example.png

 

You need the unique before the join where the * records are being joined to your second data set. The unique would be on the second data set coming in. 

Atom

Awesome! Thanks again!

Labels