Using Alteryx Macros to Revive My Company Social Life

by Ali Agah

I'm yet to meet someone who doesn't feel less connected to their colleagues than they did before the pandemic. My problem is that I have to arrange a whole conference call for a casual chat... bit formal.

A popular solution has been to 'buddy' people up so people regularly check on each other in pairs. In my opinion, this just creates little cliques across the company, failing to preserve the culture. Plus, there's the awkwardness of finding someone to cling on to until we're back in the office!

I saw a much better solution at The Information Lab...

Photo by Taylor Deas-Melesh / Unsplash
When your friend's already partnered with someone! Photo by Taylor Deas-Melesh / Unsplash

Coffee Chats

Opt in. Get a (random) name. Organise a call. Grab your  ̶b̶e̶e̶r̶  coffee!

Your partner is randomly selected every week so you only have to arrange the call, Cliques are not formed and you even meet new people (perfect for new joiners like me).

After realising I don't know my cohort's personalities as well as I know their Tableau Public, I thought to create a coffee chat system just for us. Since, we'd just learned macros on Alteryx, I was encouraged to make a macro for it.

"go on mate, make a macro" _ Joselito Bondoc, DS23

Creating the macro in Alteryx

I designed the dashboard assuming the signup sheet (input file) allows participants to write their name and whether they would like to participate that week (they can opt out by changing the 1 to 0).

Sign up spreadsheet

1. prepare the dataset

We filter out the people who do not want to have a coffee chat this week (filter tool) then add a recordID (Record ID) to allows split the column later.

Next we use the Multi-field binning tool to bin by RecordID and set the number of tiles as the number of groups we want. As DS23 is 9 people, I decided to have 3 groups.

2. Randomise the order of names

Lets split our table using the select tool to deselect the newly created RecordID_Tile_Num (we'll use it later).

Now we can use the formula tool create a column with random numbers. Using the RAND() formula, we get a random number every time we run the workflow. Combine this with the Sort tool to randomly order the rows (and names).

Finally add a new record ID (Record) for later.

3. Prepare the groupings

We need to keep the RecordID_Tile_Num (our groups) in a separate flow so they stay in the same order while the name change order. Use the select tool to keep the column and add RecordIDs again.

4. Join

Use the Join tool to create an inner join on the Record ID field and you're technically done.

5.1 Make it a macro (BONUS)

Macros are useful if you want to use the same flow repeatedly or just save it for later. They are also useful if you want to change certain values. Here, I expected to change the number of groups as people opt in and out.

You can convert the input and output to a Macro input/output by right clicking on them and selecting the 'Convert to Macro Input/Output. BAM! you have a macro.

5.2 Add interactivity

Bring in the Numeric Up Down tool from the Interface tab and set the parameters as required.

By connecting the little Q on the bottom of the Numeric Up Down to the lightning symbol above the Multi field binning, an action tool is created. Select the fields shown to replace be able to replace the number of groups with what you desire.

5.3. Make it your own

Press Ctl+Alt+D to preview and customise your designer. My favourite part is adding a custom icon to represent the macro as a tool.

6. Voila!

Save this in a safe location (as a macro) and you'll be able to put people in as many random groups as you want.

Every time you run it the names are randomised in different groups.

Let me show you...

7. Our macro in action

Here I'm inputting the same dataset we used before. This can be linked to a live, dynamic source.

Clicking on the macro opens a questions tab which allows us to choose the number of groups. Every time you run this, names will be randomly spread between the groups.

I also used a summarize tool to reformat the output. You don't have to.

Have fun creating random groups! I'm off to see my friends in DS23.