I wrote this post while listening to this song. Hit the play button and enjoy!
You are going to learn how to use Multi-Field Formula in Alteryx.
There may be times where you want to apply a formula across multiple columns simultaneously. Luckily for us, we don't need to have several robotic-arms like Doctor Octopus to do all the formulas, Alteryx has a tool that handles this task. I will explain how to configure the Multi-field Formula tool to save your time when prepping and will share a short example showing how we can apply it.
- Configuration of Multi-Field Formula Tool
- Step 1: Via the dropdown you can choose which type of fields you want to change. In the example above, 'Name' and 'City' are selected, so only these two columns will be visible. Next, you can choose which columns you actually want to change.
- As mentioned, you can either update the columns or create new ones. If you create new ones, you can choose whether to add a prefix or a suffix, and what they should be called.
- If you are modifying the current column(s), you can choose to change the data type here.
- Here you can select variables or functions to add to your formula. The variable 'Current Field' is a dynamic reference and refers to the active column. When the multi-row formula tool does its work, the columns you have selected are calculated one by one. So if columns are selected in step 1 they will also become the active column one by one. Under the 'Orginial Fields' menu you will find all the columns as variables. You can use this to make a static reference to a column. Suppose you take the column 'City' from this menu, then no matter which column is calculated (and is therefore the active column), reference will be made to the column 'City'.
- The formula you want to apply is displayed here. You can fill the editor by selecting fields or functions from the previous block or by writing them yourself.
- Example
Hopefully, after reading this blog, you are also convinced of the power of this tool. Now it's your turn. Try to use the Multi-field Formula tool on your data and if you have any question, just drop me a message!
- For more tips, you can follow me on LinkedIn.
- You can check out my portfolio on my Tableau Public.
- The song is from Spider-Man 2 (2004) - yeah, the one with Tobey Maguire - Add it on your film list this weekend if you are a Marvel's fan.