So here is my rant/debate between the functions ReplaceChar() vs Replace() in Alteryx. Here is the setup data:
Carr","Bret","D","Carr","Spouse","
I want to replace:
","
With a single underscore:
_
See image below. What I received with ReplaceChar() was three underscores! I'm sure there is a use case for this but I'd love to hear anyone's use case if you have one!
Here is the difference for using the two. I don't see the point of the ReplaceChar () if Replace() can do nearly the exact same thing.
Rant over. 😂
Solved! Go to Solution.
Rant accepted (sorry @Rant , this isn't about you!)
replacechar will replace any characters listed it the specified replacement. If you have "," being replaced, it treats each char independently.
replace looks for the string in its entirety. It replaces "," nicely with a single underscore.
Cheers,
mark
Even though I knew this as the answer, I will mark you as the solution as you are 100% correct. 😅
I just don't like having two things that basically do the same thing in different ways and having to figure which is the better choice. Sometimes there are just too many options. haha
A challenge for you:
without using a unique tool, provide me with 3 ways to find what would otherwise come out of the unique anchor of a unique tool.
cheers,
mark
What kind of homework kind of thing is this?!
Not very thorough, but that's where my mind takes me.
I've placed a workflow here that has 3 alternative methods (besides CReW macros) to get you to the unique tool output. Care to add to this workflow? I open the gauntlet to others lurking in the post too.
Cheers,
Mark
Thanks for sharing!
@MarqueeCrew Alternative 1 😲.
My contribution alternative 4 (only if the field 1 is numeric) .
@MarqueeCrew In addition to alternative 4. I wanted to be able to identify unique in a data set without a numeric column + I wanted to add a challenge to do it without using the preparation palette.
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |